public synchronized void renderMap(int xScroll, int yScroll, Screen screen) {
	screen.setOffset(xScroll, yScroll);
	int x0 = xScroll >> 4;
	int x1 = (xScroll + screen.width + 16) >> 4;
	int y0 = yScroll >> 4;
	int y1 = (yScroll + screen.height + 16) >> 4;

	for (int y = y0; y < y1; y++) {
	    for (int x = x0; x < x1; x++) {
		if (x < 0 || x >= width || y < 0 || y >= height) {
		    continue;
		}
		getTile(tiles[x + y * width][0]).render(x, y, screen);
		if (tiles[x + y * width][1] > 0) {
		    screen.renderCracks(x << 4, y << 4, tiles[x + y * width][1]);
		}
	    }
	}

    }