v0.4.2: improved tilemaps to selectively update and respect concurrency

This commit is contained in:
Evan Debenham
2016-08-26 18:17:59 -04:00
committed by Evan Debenham
parent 7a2e6c63c1
commit 6bcccba062
2 changed files with 38 additions and 11 deletions
@@ -681,15 +681,16 @@ public class GameScene extends PixelScene {
updateFog();
}
//updates the whole map
public static void updateMap() {
if (scene != null) {
scene.tiles.updated.set( 0, 0, Dungeon.level.width(), Dungeon.level.height() );
scene.tiles.updateMap();
}
}
public static void updateMap( int cell ) {
if (scene != null) {
scene.tiles.updated.union( cell % Dungeon.level.width(), cell / Dungeon.level.width() );
scene.tiles.updateMapCell( cell );
}
}