This topic is now archived and is closed to further replies.

DX7 clipping fullscreen in C++

This topic is 6035 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

I was wondering if someone could show me how to clipp the top and left sides of the screen in fullscreen mode. ill that i have read is that the clipper is used for windowed mode. i know its by manipulation of rect but the left and the top side dont seem to work correctly. my code is down below...if you see my error or have actual solid suggestion please post a reply. int BlitToBuff(LPDIRECTDRAWSURFACE7 surface,RECT rct, int x, int y) { HRESULT hRet; RECT src_rct, temp_rct; src_rct.left = x; = y; src_rct.right = x + rct.right; src_rct.bottom = y + rct.bottom; temp_rct = rct; if(src_rct.bottom > SCREENY) { temp_rct.bottom = temp_rct.bottom - (src_rct.bottom - SCREENY); src_rct.bottom = SCREENY; } if(src_rct.left < 0) { temp_rct.left = temp_rct.left - src_rct.left; src_rct.left = 0; } if(src_rct.right > SCREENX) { temp_rct.right = temp_rct.right - (src_rct.right - SCREENX); src_rct.right = SCREENX; } if( < 0) { = -(; = 0; } hRet = lpDDSBack->BltFast(x,y,surface,&temp_rct,DDBLTFAST_WAIT); if(hRet != DD_OK) { ErrStr = Err_Blt; return false; } return(DD_OK); }

Share this post

Link to post
Share on other sites