}
Dimension tsize = getTileSize(zoom); int toffset = (((modeFlags & PF_GRIDMODE) != 0) ? 1 : 0);  Rectangle clipRect = g.getClipBounds(); Point topLeft = screenToTileCoords((int) clipRect.getMinX(), (int) clipRect.getMinY()); Point bottomRight = screenToTileCoords((int) (clipRect.getMaxX() - clipRect.getMinX()), (int) (clipRect.getMaxY() - clipRect.getMinY())); int startX = (int) clipRect.x / tsize.width; int startY = (int) clipRect.y / tsize.height; int endX = (int) (clipRect.x + clipRect.width) / tsize.width; int endY = (int) ((clipRect.y + clipRect.height) / tsize.height)*2+1;  for (int y = startY, gy = (int)(startY * tsize.height + toffset); y < endY; y++,gy += tsize.getHeight()/2) { for (int x = startX, gx = (int)((startX * tsize.width + toffset) - (tsize.getWidth()*.75) * (1-y%2)); x < endX; x++, gx+=(tsize.getWidth()*1.5)) { Tile t = layer.getTileAt(x, y);  if (t != null && t != myMap.getNullTile()) { if(layer.getClass() == SelectionLayer.class) {  }else{ t.draw(g, gx, gy, zoom); } } } }  }
	protected void paint(Graphics g, MapLayer layer, double zoom) {		// TODO Auto-generated method stub	}