Original Post
I have done some timing to see where I lose speed in my current pixel drawing routine and I have tracked it down to the following line where the function memcpy is used. int offset=((ly)+(x*main.pixelwidth)); memcpy(szSurface+offset,&bgpal[pixel],main.pixelwidth); bgpal is an array that holds the palette for the specified pixel. I was wondering if anyone has any optimization ideas. I'm using direct draw btw. Thanks in advance