From 8598b0a23a83afc2d4d485e54cea380b3681f523 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 31 May 2020 16:45:03 -0400 Subject: [PATCH] Fixed bizzare planet render bugs --- core/assets-raw/sprites/units/cix-foot.png | Bin 375 -> 367 bytes core/src/mindustry/core/NetServer.java | 2 +- core/src/mindustry/core/Renderer.java | 1 - .../mindustry/ui/dialogs/PlanetDialog.java | 48 ++++++++---------- 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/core/assets-raw/sprites/units/cix-foot.png b/core/assets-raw/sprites/units/cix-foot.png index d198d789df397bc7dda560e1f025cc1fc763f010..511b23a177ae9d81b57cfbfe1499535768382a16 100644 GIT binary patch delta 327 zcmey)^qy&gVZElOi(^Pc>)ROzd7BM*81Ale4&j+5SP>@MD7ebbnyGnVo@4yFOIHq- zB{4hg)MwP|OO|1f>dm!`wEs{h|Lo4z=g9&4&xaIv@?G?rce=E0;)$sVN-tE|6E+-? z+IhA3LNwn3rvhHfhC?z}PV8O2@`-4?UTC@Tf*6j!_gjvARPCzI3S?0Ye0VJ2lE|w& z9r87At%`cmB6oVMVp$ove3Gf9`^m297UDZ2R+KphFbcQ^D5ZPKc$zhNTTVai=zYX{ z&g75NOkSt$5#WCI>8v)tV3>j5jgVu}d=7!^m(L2FPLzw{SiZI3d+V==`Bo||bY~MHU;ycd5n_efYKhn&+q;o|^+w#mV kN&S;||JP-kY9XV}Xl2|4u0|Nttr>mdKI;Vst05WTku>b%7 delta 335 zcmaFQ^qpyfVZEWJi(^Pc>)RP;c@G)zxbX%r;F~5`<+Dn { skybox.dispose(); batch.dispose(); @@ -79,7 +80,7 @@ public class PlanetDialog extends BaseDialog{ }); Events.on(ResizeEvent.class, e -> { - makeBloom(); + bloom.resize(Core.graphics.getWidth() / 4, Core.graphics.getHeight() / 4); }); TextButtonStyle style = Styles.cleart; @@ -164,19 +165,6 @@ public class PlanetDialog extends BaseDialog{ //TODO } - void makeBloom(){ - if(bloom != null){ - bloom.dispose(); - bloom = null; - } - - bloom = new Bloom(Core.graphics.getWidth()/4, Core.graphics.getHeight()/4, true, false, true){{ - setClearColor(0, 0, 0, 0); - setThreshold(0.8f); - blurPasses = 6; - }}; - } - void setup(){ cont.clear(); titleTable.remove(); @@ -188,6 +176,7 @@ public class PlanetDialog extends BaseDialog{ Draw.flush(); Gl.clear(Gl.depthBufferBit); Gl.enable(Gl.depthTest); + Gl.depthMask(true); Gl.enable(Gl.cullFace); Gl.cullFace(Gl.back); @@ -248,7 +237,7 @@ public class PlanetDialog extends BaseDialog{ } private void beginBloom(){ - bloom.capture(); + bloom.capture(); } private void endBloom(){ @@ -438,18 +427,25 @@ public class PlanetDialog extends BaseDialog{ //stored resources if(selected.hasBase() && selected.save.meta.secinfo.coreItems.size > 0){ - stable.add("Stored Resources:").row(); + stable.add("Stored:").row(); stable.table(t -> { t.left(); - for(Item item : content.items()){ - int amount = selected.save.meta.secinfo.coreItems.get(item); - if(amount > 0){ - t.image(item.icon(Cicon.small)).padRight(3); - t.add(ui.formatAmount(amount)).color(Color.lightGray); - t.row(); + t.table(res -> { + int i = 0; + for(Item item : content.items()){ + int amount = selected.save.meta.secinfo.coreItems.get(item); + if(amount > 0){ + res.image(item.icon(Cicon.small)).padRight(3); + res.add(ui.formatAmount(amount)).color(Color.lightGray); + if(++i % 2 == 0){ + res.row(); + } + } } - } + }); + + }).row(); }