Original Post
I made a program to load a bit map with text that reads "new game", but when it runs the bit map is doubled like "new game new game" and there is garbage underneath it, like dots and lines of random color. if this is not enough info I will post the source code, but I hope that will not be necessary.
heres the 24 to 16 bit convesion, since the bit map is 24 bit it might be the problem
Bloodshed Dev-C++ 4.01 DX 8.0a DX SDK 6.1 win98 #define WIN32_LEAN_AND_MEAN the Particle Projection Cannon fires a shimmering blue bolt, much like a cross between lightning and a sine wave that ripples along its path.
for (int index_y = 0; index_y < bitmap.bitmapinfoheader.biHeight; index_y++)
{
for (int index_x = 0; index_x < bitmap.bitmapinfoheader.biWidth; index_x++)
{
// get BGR values, note the scaling down of the channels, so that they
// fit into the 5.6.5 format
UCHAR blue = (bitmap.buffer[index_y*bitmap.bitmapinfoheader.biWidth*3 + index_x*3 + 0]) >> 3,
green = (bitmap.buffer[index_y*bitmap.bitmapinfoheader.biWidth*3 + index_x*3 + 1]) >> 3,
red = (bitmap.buffer[index_y*bitmap.bitmapinfoheader.biWidth*3 + index_x*3 + 2]) >> 3;
// this builds a 16 bit color value in 5.6.5 format (green dominant mode)
USHORT pixel = _RGB16BIT565(red,green,blue);
// write the pixel
image_buffer[index_x + (index_y*ddsd.lPitch >> 1)] = pixel;
} // end for index_x
} // end for index_y
Bloodshed Dev-C++ 4.01 DX 8.0a DX SDK 6.1 win98 #define WIN32_LEAN_AND_MEAN the Particle Projection Cannon fires a shimmering blue bolt, much like a cross between lightning and a sine wave that ripples along its path.