tiledrect more efficient

This commit is contained in:
Ondřej Hruška
2014-04-21 16:46:15 +02:00
parent bb84d143a8
commit 0d5b6eb995
3 changed files with 19 additions and 2 deletions
@@ -40,5 +40,8 @@ public interface MapAccess {
long getSeed();
/**
* @return level-specific noise generator
*/
NoiseGen getNoiseGen();
}
@@ -27,6 +27,9 @@ public final class TileRenderContext implements RectBound {
{
this.map = map;
this.tiler = drawArea.tiles(map.getWidth(), map.getHeight());
this.tiler.setOverlap(0.001);
this.noise = map.getNoiseGen();
}
@@ -59,7 +62,7 @@ public final class TileRenderContext implements RectBound {
@Override
public Rect getRect()
{
return tiler.tile(x, y).grow(0.01); // important to avoid gaps b/w tiles when scaled.
return tiler.tile(x, y);
}