Jump to content
  • Advertisement
Sign in to follow this  
jsloan

Couple of questions about DirectDraw

This topic is 5137 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, This is my first post here so i apologize if any of this has been covered already. Id like to know a few things :), firstly i have a DrawSprite function that uses BitBlt(). I really want to use FastBlit from the backsurface but it gives me the DDERR_INVALIDRECT return error whenever i try and set it up. It would be easier if i just posted the code... This is what im using now lpDDSBack->GetDC(&bs_DC); lpDDSTiles[iSpriteNumber]->GetDC(&bm_DC); BitBlt(bs_DC,iX,iY,800,600,bm_DC,0,0,SRCCOPY); lpDDSBack->ReleaseDC(bs_DC); lpDDSTiles[iSpriteNumber]->ReleaseDC(bm_DC); ^^ Works just fine this does not RECT rct; SetRect(&rct,iX,iY,800,600); pDDSBack->BltFast(iX,iY,lpDDSTiles[iSpriteNumber],&rct,DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT ); ^^ Quits with invalid rectangle error.. I know it has to be something with the way im initializing the rectangle object, but im not sure what it is? Can someone show me the error of my ways? :) thank you

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!