Skip to main content
GameDev.net gamedev.net
🔒 Locked

BMP weirdness

Started by cxi2 Nov 12, 2000 at 10:44 AM 0 replies 450+ views
Original Post
cxi2
cxi2
ok newbie question here::: using ddutil discussed in the tutorials section here, trying to use ddLoadBitmap function. I have my resolution set to 800X600X16 bit. I load in a bitmap to the screen ( thats all it does for right now) and i get these multi-colored lines all around the bitmap ( the bitmap is not the entire size of the screen). i thought it might be some kind of pixel formating problem, so i changed to 8 bit mode. not only was the bmp even smaller but the lines were more prevelant through out the outskirts of the image what am I doing wrong??? to Code, or Not To Code
to Code, or Not To Code
Ironblayde
Ironblayde
I think that when you create a DirectDraw surface, the memory allocated to it is not necessarily cleared out, so it probably has all sorts of garbage in it. Try clearing the surface before loading the bitmap:

  
DDBLTFX fx;
ZeroMemory(&fx, sizeof(fx));
fx.dwSize = sizeof(fx);
fx.dwFillColor = 0; // black

lpdds->Blt(NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx);


-Ironblayde
 Aeon Software

Next thing you know, they''ll take my thoughts away.
"Your superior intellect is no match for our puny weapons!"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.