diff --git a/core/src/io/anuke/mindustry/graphics/MenuRenderer.java b/core/src/io/anuke/mindustry/graphics/MenuRenderer.java index 116b54241a..8f914659bc 100644 --- a/core/src/io/anuke/mindustry/graphics/MenuRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/MenuRenderer.java @@ -22,7 +22,6 @@ public class MenuRenderer implements Disposable{ private Matrix3 mat = new Matrix3(); private FrameBuffer shadows; private CacheBatch batch; - private Texture texture = new Texture("sprites/backgrounds/background-1.png"); public MenuRenderer(){ Time.mark(); @@ -44,11 +43,11 @@ public class MenuRenderer implements Disposable{ Block ore = Blocks.air; Block wall = Blocks.air; - if(s1.octaveNoise2D(3, 0.5, 1/10.0, x, y) > 0.5){ + if(s1.octaveNoise2D(3, 0.5, 1/20.0, x, y) > 0.5){ wall = Blocks.shaleRocks; } - if(s3.octaveNoise2D(3, 0.5, 1/10.0, x, y) > 0.5){ + if(s3.octaveNoise2D(3, 0.5, 1/20.0, x, y) > 0.5){ floor = Blocks.stone; if(wall != Blocks.air){ wall = Blocks.rocks; @@ -59,7 +58,7 @@ public class MenuRenderer implements Disposable{ ore = Blocks.oreCopper; } - if(s2.octaveNoise2D(3, 0.3, 1/15.0, x, y+999999) > 0.7){ + if(s2.octaveNoise2D(2, 0.2, 1/15.0, x, y+99999) > 0.7){ ore = Blocks.oreLead; } @@ -131,36 +130,30 @@ public class MenuRenderer implements Disposable{ } public void render(){ + float scaling = 4f; + camera.position.set(width * tilesize / 2f, height * tilesize / 2f); + camera.resize(Core.graphics.getWidth() / scaling, + Core.graphics.getHeight() / scaling); + + mat.set(Draw.proj()); + Draw.flush(); + Draw.proj(camera.projection()); + batch.setProjection(camera.projection()); + batch.beginDraw(); + batch.drawCache(cacheFloor); + batch.endDraw(); + Draw.rect(Draw.wrap(shadows.getTexture()), + width * tilesize / 2f - 4f, height * tilesize / 2f - 4f, + width * tilesize, -height * tilesize); + Draw.flush(); + batch.beginDraw(); + batch.drawCache(cacheWall); + batch.endDraw(); + + Draw.proj(mat); + Draw.color(0f, 0f, 0f, darkness); + Fill.crect(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()); Draw.color(); - float scale = 1f; - Draw.rect(Draw.wrap(texture), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, 2048 * scale, 2048 * scale); - - if(false){ - float scaling = 4f; - camera.position.set(width * tilesize / 2f, height * tilesize / 2f); - camera.resize(Core.graphics.getWidth() / scaling, - Core.graphics.getHeight() / scaling); - - mat.set(Draw.proj()); - Draw.flush(); - Draw.proj(camera.projection()); - batch.setProjection(camera.projection()); - batch.beginDraw(); - batch.drawCache(cacheFloor); - batch.endDraw(); - Draw.rect(Draw.wrap(shadows.getTexture()), - width * tilesize / 2f - 4f, height * tilesize / 2f - 4f, - width * tilesize, -height * tilesize); - Draw.flush(); - batch.beginDraw(); - batch.drawCache(cacheWall); - batch.endDraw(); - - Draw.proj(mat); - Draw.color(0f, 0f, 0f, darkness); - Fill.crect(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()); - Draw.color(); - } } @Override diff --git a/core/src/io/anuke/mindustry/io/SaveVersion.java b/core/src/io/anuke/mindustry/io/SaveVersion.java index 4bc8015467..36cf4a5233 100644 --- a/core/src/io/anuke/mindustry/io/SaveVersion.java +++ b/core/src/io/anuke/mindustry/io/SaveVersion.java @@ -251,7 +251,6 @@ public abstract class SaveVersion extends SaveFileReader{ } public void readContentHeader(DataInput stream) throws IOException{ - byte mapped = stream.readByte(); MappableContent[][] map = new MappableContent[ContentType.values().length][0]; diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index 4cccab941f..9af5f3f323 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -14,7 +14,7 @@ public class DesktopLauncher{ config.setTitle("Mindustry"); config.setMaximized(true); config.setBackBufferConfig(8, 8, 8, 8, 0, 0, 0); - config.setWindowedMode(960, 540); + config.setWindowedMode(900, 600); config.setWindowIcon("sprites/icon.png"); Platform.instance = new DesktopPlatform(arg);