/* Set the pixel at (x, y) to the given value NOTE: The surface must be locked before calling this!  */
void DT_PutPixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
/* Set the pixel at (x, y) to the given value NOTE: The surface must be locked before calling this!  */
void DT_PutPixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
{
	case 1:
		*p = pixel;
		break;
	case 2:
		*(Uint16 *) p = pixel;
		break;
	case 3:
		if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
			p[0] = (pixel >> 16) & 0xff;
			p[1] = (pixel >> 8) & 0xff;
			p[2] = pixel & 0xff;
		} else {
			p[0] = pixel & 0xff;
			p[1] = (pixel >> 8) & 0xff;
			p[2] = (pixel >> 16) & 0xff;
		}
		break;
	case 4:
		*(Uint32 *) p = pixel;
		break;
	default:
		break;
	}
}