Archived

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

MaximoGuerrero

DX7 clipping fullscreen in C++

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; src_rct.top = 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(src_rct.top < 0) { temp_rct.top = temp_rct.top -(src_rct.top); src_rct.top = 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