v0.9.1b: addressed/removed numerous TODO/FIXME lines & some unused code
This commit is contained in:
@@ -214,36 +214,6 @@ public class Tilemap extends Visual {
|
||||
topLeftUpdating = -1;
|
||||
updating.setEmpty();
|
||||
}
|
||||
|
||||
//FIXME temporarily disabled this optimization as it is suspected to cause crashes
|
||||
/*Camera c = Camera.main;
|
||||
//we treat the position of the tilemap as (0,0) here
|
||||
camX = (int)(c.scroll.x/cellW - x/cellW);
|
||||
camY = (int)(c.scroll.y/cellH - y/cellH);
|
||||
camW = (int)Math.ceil(c.width/cellW);
|
||||
camH = (int)Math.ceil(c.height/cellH);
|
||||
|
||||
if (camX >= mapWidth
|
||||
|| camY >= mapHeight
|
||||
|| camW + camW <= 0
|
||||
|| camH + camH <= 0)
|
||||
return;
|
||||
|
||||
//determines the top-left visible tile, the bottom-right one, and the buffer length
|
||||
//between them, this culls a good number of none-visible tiles while keeping to 1 draw
|
||||
topLeft = Math.max(camX, 0)
|
||||
+ Math.max(camY*mapWidth, 0);
|
||||
|
||||
bottomRight = Math.min(camX+camW, mapWidth-1)
|
||||
+ Math.min((camY+camH)*mapWidth, (mapHeight-1)*mapWidth);
|
||||
|
||||
if (topLeft >= size || bottomRight < 0)
|
||||
length = 0;
|
||||
else
|
||||
length = bottomRight - topLeft + 1;
|
||||
|
||||
if (length <= 0)
|
||||
return;*/
|
||||
|
||||
NoosaScript script = script();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user