stupid colorfill question
I got this working before but for some reason I cant get it to work now. I want to paint the Primary surface all black.
DDBLTFX ddbltfx;
// Erase the primary surface
ddbltfx.dwFillColor = RGB(0, 0, 0);
g_pDDSPrimary->Blt( NULL, NULL, NULL, DDBLT_COLORFILL, &ddbltfx );
It's not reverse engineering, unless you get caught.
I dont think I am zeroing out anything. What you see is what I have in my code.
It's not reverse engineering, unless you get caught.
Try
memset(&ddbltfx,0,sizeof(ddbltfx);
ddbltfx.dwSize = sizeof(ddbltfx);
You might also need to specify a colorfill in the ddbltfx.dwCaps field.
- Sleepwalker
memset(&ddbltfx,0,sizeof(ddbltfx);
ddbltfx.dwSize = sizeof(ddbltfx);
You might also need to specify a colorfill in the ddbltfx.dwCaps field.
- Sleepwalker
- Sleepwalker
You could also add the DDBLT_WAIT flag to your blt call. Could make a difference...
I think this error was caused because he did not clean the struct. B.t.w: ZeroMemory (&ddbltfx, sizeof (ddbltfx)); has the same effect...
No you cant do that RGB macro thing. dwFillColor wants a DWORD and RGB(0,0,0) returns a COLORREF structure. look in the ddutil.cpp file in the sdk and look for the function colormatch then change your code to
ddbltfx.dwFillColor = DDColorMatch(g_pDDSPrimary,RGB(0,0,0));
ddbltfx.dwFillColor = DDColorMatch(g_pDDSPrimary,RGB(0,0,0));
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement