diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameSaver.java b/core/src/ru/deadsoftware/cavecraft/game/GameSaver.java
index 070b5c24009524548980c60dee82cb0a86328930..fccc7bc8a889378d7e1ef89fb9a6cfef53b7d68a 100644 (file)
byte[] bytes = ByteBuffer.allocate(4).putInt(i).array();
file.writeBytes(bytes, append);
}
-
+
private static void saveMap(FileHandle file, int[][] map) {
int rl,bl;
int width = map.length;
if (x==map.length-1) rl++;
writeInt(file, rl, true);
writeInt(file, bl, true);
- System.out.printf("%d. Run:%d; Block:%s\n",y, rl, Items.BLOCKS.getKeyAt(bl));
rl=0;
bl=map[x][y];
}
for (int x=0; x<width; x+=rl) {
rl = bytesInt(data);
bl = bytesInt(data);
- System.out.printf("%d. Run:%d; Block:%s\n",y, rl, Items.BLOCKS.getKeyAt(bl));
for (int i=x; i<x+rl; i++) map[i][y] = bl;
}
}