//My color macro
#define RGB16(r,g,b) ((b%32)+((g%64)<<5)+((r%32)<<11))
int GameMain()
{
if (KEYDOWN(VK_ESCAPE))
SendMessage(main_window_handle,WM_CLOSE,0,0);
RECT dest_rect;
memset(&ddbltfx, 0, sizeof(ddbltfx));
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwFillColor=RGB16(10,20,10);
dest_rect.left=0;
dest_rect.top=0;
dest_rect.right=5;
dest_rect.bottom=5;
lpddsback->Blt(&dest_rect,NULL,NULL,DDBLT_COLORFILL|DDBLT_WAIT,&ddbltfx);
while(FAILED(lpddsprimary->Flip(NULL,DDFLIP_WAIT)));
Sleep(300);
return(1);
}
My program just keeps blitting random colors and fullscreen please help
Brendon Glanzer
More help with blitting
I had just got some help with blitting and everything was going good, untill I didnt want to blit random colors or make it blit fullscreen. I just want it to blit a certain color over and over and just in a small area here is some of my code.
Nothing seems to be wrong with your code (nothing that I can see, that is). Maybe you should try rebuilding your project?
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement