summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cdffa6e)
raw | patch | inline | side by side (parent: cdffa6e)
author | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 14:35:12 +0000 (21:35 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Wed, 25 Apr 2018 14:35:12 +0000 (21:35 +0700) |
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java
index 648e785e8d07a96c9de6728124be0bcaac3013a8..38c79f1641b3e335ab2838ba80a873d58998fa03 100644 (file)
if (maxY>gameProc.world.getHeight()) maxY = gameProc.world.getHeight();
for (int y=minY; y<maxY; y++) {
for (int x=minX; x<maxX; x++) {
- if (gameProc.world.getForeMap(x,y)>0) {
+ if (gameProc.world.getForeMap(x,y)>0 && !Items.BLOCKS.getValueAt(gameProc.world.getForeMap(x,y)).background) {
spriteBatch.draw(
Assets.blockTextures[Items.BLOCKS.getValueAt(gameProc.world.getForeMap(x,y)).getTexture()],
x * 16 - camera.position.x,y * 16 - camera.position.y);
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameSaver.java b/core/src/ru/deadsoftware/cavecraft/game/GameSaver.java
index aab81f54ecb26d101c315e0fbe8c98bd4dab1e8f..2b5b906d877a3dadcd77baca27e1e346d8eeeff1 100644 (file)
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
+import com.badlogic.gdx.utils.ArrayMap;
import ru.deadsoftware.cavecraft.CaveGame;
import java.io.*;
loadMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/foremap.sav")),
loadMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/backmap.sav"))
);
+ gameProc.world.metaMap = new ArrayMap<String, Integer>();
gameProc.physics = new GamePhysics(gameProc);
gameProc.resetRenderer();
} catch (Exception e) {
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java
index fc0c24712a88999124dac75967302106f7a06401..5f5a407d44a68c03e23a7ddeb848c61dd3abb26d 100644 (file)
private int WIDTH, HEIGHT;
- private ArrayMap<String, Integer> metaMap;
+ public ArrayMap<String, Integer> metaMap;
private int[][] foreMap;
private int[][] backMap;