Increased fog view range, added tile fog discovery

This commit is contained in:
Anuken
2018-06-24 16:20:42 -04:00
parent 41e611d7db
commit ca10ab0274
8 changed files with 53 additions and 10 deletions
@@ -61,14 +61,12 @@ public class MapTileData {
/**Write a byte to a specific position.*/
public void write(int x, int y, DataPosition position, byte data){
buffer.position((x + width * y) * TILE_SIZE + position.ordinal());
buffer.put(data);
buffer.put((x + width * y) * TILE_SIZE + position.ordinal(), data);
}
/**Gets a byte at a specific position.*/
public byte read(int x, int y, DataPosition position){
buffer.position((x + width * y) * TILE_SIZE + position.ordinal());
return buffer.get();
return buffer.get((x + width * y) * TILE_SIZE + position.ordinal());
}
/**Reads and returns the next tile data.*/