void copyBGToBuf(Graphics bufg, int sx1,int sy1,int sx2,int sy2,
	int dx1,int dy1) {
		//System.out.println("("+sx1+","+sy1+")-("+sx2+","+sy2+")");
		if (sx2<=sx1 || sy2<=sy1) return;
		int barrelx = el.scaleXPos(el.moduloFloor(el.xofs,el.tilex),false);
		int barrely = el.scaleYPos(el.moduloFloor(el.yofs,el.tiley),false);
		int barreldx = (sx1==0) ? barrelx : 0;
		int barreldy = (sy1==0) ? barrely : 0;
		barrelx = (sx1==0) ? 0 : barrelx;
		barrely = (sy1==0) ? 0 : barrely;
		int dx2 = dx1 + sx2-sx1;
		int dy2 = dy1 + sy2-sy1;
		bufg.drawImage(background,
			dx1*el.scaledtilex-barreldx, dy1*el.scaledtiley-barreldy,
			dx2*el.scaledtilex-barreldx, dy2*el.scaledtiley-barreldy,
			barrelx+sx1*el.scaledtilex, barrely+sy1*el.scaledtiley,
			barrelx+sx2*el.scaledtilex, barrely+sy2*el.scaledtiley,
			this);
	}