From 9f84b84819dd310d10c8dbf4cb7ef39073c1cf94 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Jan 2019 12:17:42 -0500 Subject: [PATCH] Removed all extra floor rendering for larger worlds --- core/src/io/anuke/mindustry/graphics/FloorRenderer.java | 4 ++-- core/src/io/anuke/mindustry/world/blocks/Floor.java | 3 ++- core/src/io/anuke/mindustry/world/blocks/OreBlock.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/io/anuke/mindustry/graphics/FloorRenderer.java b/core/src/io/anuke/mindustry/graphics/FloorRenderer.java index 461756141f..e37eeee4de 100644 --- a/core/src/io/anuke/mindustry/graphics/FloorRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/FloorRenderer.java @@ -181,7 +181,7 @@ public class FloorRenderer{ if(floor.cacheLayer == layer){ floor.draw(tile); }else if(floor.cacheLayer.ordinal() < layer.ordinal()){ - floor.drawNonLayer(tile); + //floor.drawNonLayer(tile); } } } @@ -195,7 +195,7 @@ public class FloorRenderer{ int chunksx = Mathf.ceil((float) (world.width()) / chunksize), chunksy = Mathf.ceil((float) (world.height()) / chunksize) ; cache = new Chunk[chunksx][chunksy]; - cbatch = new CacheBatch(world.width() * world.height() * 4 * 4); + cbatch = new CacheBatch(world.width() * world.height()); Time.mark(); diff --git a/core/src/io/anuke/mindustry/world/blocks/Floor.java b/core/src/io/anuke/mindustry/world/blocks/Floor.java index abc3cd3a9b..1ee216c81e 100644 --- a/core/src/io/anuke/mindustry/world/blocks/Floor.java +++ b/core/src/io/anuke/mindustry/world/blocks/Floor.java @@ -139,6 +139,7 @@ public class Floor extends Block{ Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.worldx(), tile.worldy()); + /* if(tile.hasCliffs() && cliffRegions != null){ for(int i = 0; i < 4; i++){ if((tile.getCliffs() & (1 << i * 2)) != 0){ @@ -160,7 +161,7 @@ public class Floor extends Block{ } Draw.reset(); - drawEdges(tile, false); + drawEdges(tile, false);*/ } public boolean blendOverride(Block block){ diff --git a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java index ec04c1ade7..6aa0a436ce 100644 --- a/core/src/io/anuke/mindustry/world/blocks/OreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/OreBlock.java @@ -37,7 +37,7 @@ public class OreBlock extends Floor{ public void draw(Tile tile){ Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.worldx(), tile.worldy()); - drawEdges(tile, false); + //drawEdges(tile, false); } @Override