Skip to main content
gamedev.net
🔒 Locked

DirectDraw-Problems

Started by Chefbrenner Sep 16, 2000 at 7:41 AM 5 replies 400+ views
Original Post
Chefbrenner
Chefbrenner
I''m currently coding on a 2D-RPG based on DirectDraw and I''ve got a strange problem: During the loading process I create several 16Bit-Surfaces...one of them is sized 550x75 and holds the Ground-Textures, so far so good BUT: When I clear the surface (lock it, use memset with 550x75x2 and unlock it) it isn''t fully cleared! I took two screenshots from the bar, both show the bug in the lower part of the image...the light blue thing is my ingame mouse cursor, the dark blue square is one of the ground textures and the lowest square (orange in the middle, yellow in the corners) is a texture from a test I did before and was still in the memory... On the right shot I used memset with a green color to show how far the clearing goes... Does anybody have an idea, why this happens? Thx Chefbrenner
Greetings,ChefbrennerRemember: If it breaths it can be killed!
Chefbrenner
Chefbrenner
Hmm...something doesn''t work with the screenshot...
Here''s the link to it... Should work now...
Greetings,ChefbrennerRemember: If it breaths it can be killed!
Steven
Steven
Nope, still a problem, I think it''s fortune city thats the problem, You will have to put a html file up with your image on it, and link to the html from your main page to let us view it.
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
Robokid
Robokid
Hi,

maybe the surface pitch is not 550 * 2 bytes.

Try something like this:
memset( ddsd.lpSurface, 0, ddsd.lPitch*75 );
( ddsd = DDSURFACEDESC of your surface )
Chefbrenner
Chefbrenner
Well...IT WORKS!
Thanx again
Cya when I find the next bug or the game is finished! *smile*
Greetings,ChefbrennerRemember: If it breaths it can be killed!

Topic Locked

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

Sign in to reply to this topic.