Sign in to follow this  
jsloan

Couple of questions about DirectDraw

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this