diff --git a/android/src/mindustry/android/AndroidLauncher.java b/android/src/mindustry/android/AndroidLauncher.java index 1c9ee8f144..b92865c68a 100644 --- a/android/src/mindustry/android/AndroidLauncher.java +++ b/android/src/mindustry/android/AndroidLauncher.java @@ -162,7 +162,6 @@ public class AndroidLauncher extends AndroidApplication{ }, new AndroidApplicationConfiguration(){{ useImmersiveMode = true; hideStatusBar = true; - stencil = 8; }}); checkFiles(getIntent()); diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index 67815fd1d2..52f99b72d5 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -67,7 +67,6 @@ public class Renderer implements ApplicationListener{ @Override public void update(){ Color.white.set(1f, 1f, 1f, 1f); - Gl.clear(Gl.stencilBufferBit); float dest = Mathf.round(targetscale, 0.5f); camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f); diff --git a/core/src/mindustry/ui/fragments/HudFragment.java b/core/src/mindustry/ui/fragments/HudFragment.java index a5f1269cbc..1f8568a920 100644 --- a/core/src/mindustry/ui/fragments/HudFragment.java +++ b/core/src/mindustry/ui/fragments/HudFragment.java @@ -637,20 +637,11 @@ public class HudFragment extends Fragment{ if(Float.isNaN(value) || Float.isInfinite(value)) value = 1f; - drawInner(Pal.darkishGray); - - Draw.beginStencil(); - - Fill.crect(x, y, width, height * value); - - Draw.beginStenciled(); - - drawInner(Tmp.c1.set(color).lerp(Color.white, blink)); - - Draw.endStencil(); + drawInner(Pal.darkishGray, 1f); + drawInner(Tmp.c1.set(color).lerp(Color.white, blink), value); } - void drawInner(Color color){ + void drawInner(Color color, float fract){ if(flip){ x += width; width = -width; @@ -660,19 +651,26 @@ public class HudFragment extends Fragment{ float bh = height/2f; Draw.color(color); + float f1 = Math.min(fract * 2f, 1f), f2 = (fract - 0.5f) * 2f; + + float bo = -(1f - f1) * (width - stroke); + Fill.quad( x, y, x + stroke, y, - x + width, y + bh, - x + width - stroke, y + bh + x + width + bo, y + bh * f1, + x + width - stroke + bo, y + bh * f1 ); - Fill.quad( - x + width, y + bh, - x + width - stroke, y + bh, - x, y + height, - x + stroke, y + height - ); + if(f2 > 0){ + float bx = x + (width - stroke) * (1f - f2); + Fill.quad( + x + width, y + bh, + x + width - stroke, y + bh, + bx, y + height * fract, + bx + stroke, y + height * fract + ); + } Draw.reset(); diff --git a/core/src/mindustry/world/blocks/power/PowerNode.java b/core/src/mindustry/world/blocks/power/PowerNode.java index ad17ea3acd..0c66eef09a 100644 --- a/core/src/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/mindustry/world/blocks/power/PowerNode.java @@ -145,6 +145,7 @@ public class PowerNode extends PowerBlock{ getPotentialLinks(tile, other -> { Drawf.square(other.x, other.y, other.block.size * tilesize / 2f + 2f, Pal.place); + insulators(tile.x, tile.y, other.tileX(), other.tileY(), cause -> { Drawf.square(cause.x, cause.y, cause.block.size * tilesize / 2f + 2f, Pal.plastanium); }); diff --git a/desktop/src/mindustry/desktop/DesktopLauncher.java b/desktop/src/mindustry/desktop/DesktopLauncher.java index cf60813b7b..ad8e03d5c0 100644 --- a/desktop/src/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/mindustry/desktop/DesktopLauncher.java @@ -36,7 +36,6 @@ public class DesktopLauncher extends ClientLauncher{ new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{ title = "Mindustry"; maximized = true; - stencil = 1; width = 900; height = 700; setWindowIcon(FileType.internal, "icons/icon_64.png"); diff --git a/gradle.properties b/gradle.properties index 5d248978cc..c5fbb43378 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=9882706f68a954ce9d29b64cb8224cd4ec3cedc3 +archash=383cca56f16c9cb00c77db681860d6f420f25b53 diff --git a/ios/src/mindustry/ios/IOSLauncher.java b/ios/src/mindustry/ios/IOSLauncher.java index 73f6fa1b93..eda03585bc 100644 --- a/ios/src/mindustry/ios/IOSLauncher.java +++ b/ios/src/mindustry/ios/IOSLauncher.java @@ -16,7 +16,6 @@ import mindustry.net.*; import mindustry.ui.*; import org.robovm.apple.coregraphics.*; import org.robovm.apple.foundation.*; -import org.robovm.apple.glkit.*; import org.robovm.apple.uikit.*; import org.robovm.objc.block.*; @@ -25,7 +24,7 @@ import java.util.*; import java.util.zip.*; 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 @SuppressWarnings("deprecation") @@ -175,9 +174,7 @@ public class IOSLauncher extends IOSApplication.Delegate{ forced = false; UINavigationController.attemptRotationToDeviceOrientation(); } - }, new IOSApplicationConfiguration(){{ - stencilFormat = GLKViewDrawableStencilFormat._8; - }}); + }, new IOSApplicationConfiguration()); } @Override