public void renderTile(int xp, int yp, int color, Tile tile){
		xp -= xOffset;
		yp -= yOffset;
		int size = tile.sprite.size;
		for(int y = 0; y < size; y++){
			int ya = y + yp;
			for(int x = 0; x < size; x++){
				int xa = x + xp;
				if(xa < -size || xa >= width || ya < 0 || ya >= height) break;
				if(xa < 0) xa = 0;
				int col = tile.sprite.pixels[x + y * size];
				
				if(color != -1) col = blend(col, color, 0.5f);
				
				if(col != 0xffff00ff && col != 0xff7f007f) pixels[xa + ya * width]  = col;
			}
		}
	}