Fixed green line bug - Removed stencil+depth buffers
This commit is contained in:
@@ -162,7 +162,6 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}, new AndroidApplicationConfiguration(){{
|
}, new AndroidApplicationConfiguration(){{
|
||||||
useImmersiveMode = true;
|
useImmersiveMode = true;
|
||||||
hideStatusBar = true;
|
hideStatusBar = true;
|
||||||
stencil = 8;
|
|
||||||
}});
|
}});
|
||||||
checkFiles(getIntent());
|
checkFiles(getIntent());
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ public class Renderer implements ApplicationListener{
|
|||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
Color.white.set(1f, 1f, 1f, 1f);
|
Color.white.set(1f, 1f, 1f, 1f);
|
||||||
Gl.clear(Gl.stencilBufferBit);
|
|
||||||
|
|
||||||
float dest = Mathf.round(targetscale, 0.5f);
|
float dest = Mathf.round(targetscale, 0.5f);
|
||||||
camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f);
|
camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f);
|
||||||
|
|||||||
@@ -637,20 +637,11 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
if(Float.isNaN(value) || Float.isInfinite(value)) value = 1f;
|
if(Float.isNaN(value) || Float.isInfinite(value)) value = 1f;
|
||||||
|
|
||||||
drawInner(Pal.darkishGray);
|
drawInner(Pal.darkishGray, 1f);
|
||||||
|
drawInner(Tmp.c1.set(color).lerp(Color.white, blink), value);
|
||||||
Draw.beginStencil();
|
|
||||||
|
|
||||||
Fill.crect(x, y, width, height * value);
|
|
||||||
|
|
||||||
Draw.beginStenciled();
|
|
||||||
|
|
||||||
drawInner(Tmp.c1.set(color).lerp(Color.white, blink));
|
|
||||||
|
|
||||||
Draw.endStencil();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawInner(Color color){
|
void drawInner(Color color, float fract){
|
||||||
if(flip){
|
if(flip){
|
||||||
x += width;
|
x += width;
|
||||||
width = -width;
|
width = -width;
|
||||||
@@ -660,19 +651,26 @@ public class HudFragment extends Fragment{
|
|||||||
float bh = height/2f;
|
float bh = height/2f;
|
||||||
Draw.color(color);
|
Draw.color(color);
|
||||||
|
|
||||||
|
float f1 = Math.min(fract * 2f, 1f), f2 = (fract - 0.5f) * 2f;
|
||||||
|
|
||||||
|
float bo = -(1f - f1) * (width - stroke);
|
||||||
|
|
||||||
Fill.quad(
|
Fill.quad(
|
||||||
x, y,
|
x, y,
|
||||||
x + stroke, y,
|
x + stroke, y,
|
||||||
x + width, y + bh,
|
x + width + bo, y + bh * f1,
|
||||||
x + width - stroke, y + bh
|
x + width - stroke + bo, y + bh * f1
|
||||||
);
|
);
|
||||||
|
|
||||||
Fill.quad(
|
if(f2 > 0){
|
||||||
x + width, y + bh,
|
float bx = x + (width - stroke) * (1f - f2);
|
||||||
x + width - stroke, y + bh,
|
Fill.quad(
|
||||||
x, y + height,
|
x + width, y + bh,
|
||||||
x + stroke, y + height
|
x + width - stroke, y + bh,
|
||||||
);
|
bx, y + height * fract,
|
||||||
|
bx + stroke, y + height * fract
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
getPotentialLinks(tile, other -> {
|
getPotentialLinks(tile, other -> {
|
||||||
Drawf.square(other.x, other.y, other.block.size * tilesize / 2f + 2f, Pal.place);
|
Drawf.square(other.x, other.y, other.block.size * tilesize / 2f + 2f, Pal.place);
|
||||||
|
|
||||||
insulators(tile.x, tile.y, other.tileX(), other.tileY(), cause -> {
|
insulators(tile.x, tile.y, other.tileX(), other.tileY(), cause -> {
|
||||||
Drawf.square(cause.x, cause.y, cause.block.size * tilesize / 2f + 2f, Pal.plastanium);
|
Drawf.square(cause.x, cause.y, cause.block.size * tilesize / 2f + 2f, Pal.plastanium);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{
|
new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{
|
||||||
title = "Mindustry";
|
title = "Mindustry";
|
||||||
maximized = true;
|
maximized = true;
|
||||||
stencil = 1;
|
|
||||||
width = 900;
|
width = 900;
|
||||||
height = 700;
|
height = 700;
|
||||||
setWindowIcon(FileType.internal, "icons/icon_64.png");
|
setWindowIcon(FileType.internal, "icons/icon_64.png");
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=9882706f68a954ce9d29b64cb8224cd4ec3cedc3
|
archash=383cca56f16c9cb00c77db681860d6f420f25b53
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import mindustry.net.*;
|
|||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import org.robovm.apple.coregraphics.*;
|
import org.robovm.apple.coregraphics.*;
|
||||||
import org.robovm.apple.foundation.*;
|
import org.robovm.apple.foundation.*;
|
||||||
import org.robovm.apple.glkit.*;
|
|
||||||
import org.robovm.apple.uikit.*;
|
import org.robovm.apple.uikit.*;
|
||||||
import org.robovm.objc.block.*;
|
import org.robovm.objc.block.*;
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@ import java.util.*;
|
|||||||
import java.util.zip.*;
|
import java.util.zip.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
import static org.robovm.apple.foundation.NSPathUtilities.getDocumentsDirectory;
|
import static org.robovm.apple.foundation.NSPathUtilities.*;
|
||||||
|
|
||||||
//warnings for deprecated functions related to multi-window applications are not applicable here
|
//warnings for deprecated functions related to multi-window applications are not applicable here
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@@ -175,9 +174,7 @@ public class IOSLauncher extends IOSApplication.Delegate{
|
|||||||
forced = false;
|
forced = false;
|
||||||
UINavigationController.attemptRotationToDeviceOrientation();
|
UINavigationController.attemptRotationToDeviceOrientation();
|
||||||
}
|
}
|
||||||
}, new IOSApplicationConfiguration(){{
|
}, new IOSApplicationConfiguration());
|
||||||
stencilFormat = GLKViewDrawableStencilFormat._8;
|
|
||||||
}});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user