direct draw blitter problem

Started by
-1 comments, last by jimywang 20 years, 1 month ago
i have some problem with direct draw blitter.here is my function. int DDraw_Draw_Surface(LPDIRECTDRAWSURFACE4 source, int x, int y, int width, int height, LPDIRECTDRAWSURFACE4 dest, bool transparent) { RECT dest_rect, source_rect; dest_rect.left = x; dest_rect.top = y; dest_rect.right = x+width-1; dest_rect.bottom = y+height-1; source_rect.left = 0; source_rect.top = 0; source_rect.right = width-1; source_rect.bottom = height-1; if (transparent) { if (FAILED(dest->Blt(&dest_rect, source, &source_rect,(DDBLT_WAIT | DDBLT_KEYSRC), NULL))) return(0); } // end if else { if (FAILED(dest->Blt(&dest_rect, source, &source_rect,(DDBLT_WAIT), NULL))) return(0); } // end if return(1); } // end DDraw_Draw_Surface DDraw_Draw_Surface(wall,50,50,64,64,lpddsback,false); when i try to use this function to draw a bitmap on screen,my origial program works as usual,but there is nothing handled by the blitter appears on screen.im sure there is nothing wrong with with the off screen buffer,cause i tried to display it on screen.really dont no whats going on here.please help.

This topic is closed to new replies.

Advertisement