public void renderRect(int x, int y, int w, int h, int c, boolean light) {
		x -= xOff;
		y -= yOff;

		for (int yy = 0; yy < h; yy++) {
			if ((yy + y) < 0 || (yy + y) >= height)
				continue;
			for (int xx = 0; xx < w; xx++) {
				if ((xx + x) < 0 || (xx + x) >= width)
					continue;

				int col = c;
				if (lightingEnabled && light) {
					col = applyLighting(col, xx + x, yy + y);
				}
				pixels[(xx+x) + (yy+y) * width] = col;
			}
		}
	}