public void renderSprite(int xp,int yp,Sprite sprite,boolean Fixed){
		if(Fixed){
			xp -= xOffset;
			yp -= yOffset;
		}
		for(int y = 0; y < sprite.getheight(); y++){
			int ya = y + yp;
			for(int x = 0; x < sprite.getwidth(); x++){
				int xa = x + xp;
				if (xa < 0 || xa >= width || ya < 0 || ya >= height) continue;
				pixels[xa + ya * width] = sprite.pixels[x + y * sprite.getwidth()];
			}
		}
	}