float halfTileHeight = tileHeight * 0.5f;
for (int row = row2; row >= row1; row--) {
for (int col = col1; col <= col2; col++) {
float x = (col * halfTileWidth) + (row * halfTileWidth);
float y = (row * halfTileHeight) - (col * halfTileHeight);
<BUG>final TiledMapTileLayer.Cell cell = layer.getCell(col, row);
final TiledMapTile tile = cell.getTile();</BUG>
if (tile != null) {
final boolean flipX = cell.getFlipHorizontally();
final boolean flipY = cell.getFlipVertically();

float halfTileHeight = tileHeight * 0.5f;
for (int row = row2; row >= row1; row--) {
for (int col = col1; col <= col2; col++) {
float x = (col * halfTileWidth) + (row * halfTileWidth);
float y = (row * halfTileHeight) - (col * halfTileHeight);
final TiledMapTileLayer.Cell cell = layer.getCell(col, row);
if(cell == null) continue;
final TiledMapTile tile = cell.getTile();
if (tile != null) {
final boolean flipX = cell.getFlipHorizontally();
final boolean flipY = cell.getFlipVertically();
