Rectangle cr(curcx*tiles_per_chunk, curcy*tiles_per_chunk, tiles_per_chunk, tiles_per_chunk);
Rectangle cr(curcx*c_tiles_per_chunk, curcy*c_tiles_per_chunk, c_tiles_per_chunk, c_tiles_per_chunk);
	int get_next(Rectangle& intersect, int& cx, int& cy)		{		if (curcx > lastcx)	// End of row?			if (curcy > lastcy)				return (0);			else				{				curcy++;				curcx = firstcx;				}		Rectangle cr(curcx*tiles_per_chunk, curcy*tiles_per_chunk,				tiles_per_chunk, tiles_per_chunk);					// Intersect given rect. with chunk.		intersect = cr.intersect(tiles);					// Make it 0-based rel. to chunk.		intersect.shift(-cr.x, -cr.y);		cx = curcx;		cy = curcy;		curcx++;		return (1);		}