v0.4.2: fixed a bug with tilemap culling on maps that aren't square

This commit is contained in:
Evan Debenham 2016-09-08 17:49:37 -04:00
parent 98b5fe0394
commit 5ad6c69e93

View File

@ -241,7 +241,7 @@ public class Tilemap extends Visual {
topLeft++;
bottomRight = Math.min(camX+camW, mapWidth-1)
+ Math.min((camY+camH)*mapWidth, mapHeight*(mapWidth-1));
+ Math.min((camY+camH)*mapWidth, (mapHeight-1)*mapWidth);
while(bufferPositions[bottomRight] == -1)
bottomRight--;