Incorrect Parms
Hey
Here is some code, could someone tell me whats wrong with the paramters for the blt and bltfst, thanks...
Code:
srcRect.top = 0;
srcRect.left = 0;
srcRect.right = 50;
srcRect.bottom = 50;
destRect.top = 0;
destRect.left = 0;
destRect.right = 640;
destRect.bottom = 480;
ddrval = lpDDSBack->Blt(NULL, lpDDSOffTwo,NULL, DDBLT_WAIT | DDBLT_KEYDEST, NULL);
if(ddrval != DD_OK) {
MessageBox(hwnd, "nope", "", MB_OK);
}
ddrval = lpDDSBack->BltFast( xpos, ypos, lpDDSOffOne, &srcRect, DDBLTFAST_DESTCOLORKEY | DDBLTFAST_WAIT );
if(ddrval != DD_OK) {
MessageBox(hwnd, "15", "", MB_OK);
}
Edited by - JSCFaith on 7/14/00 11:38:26 PM
i had the exact smae problem before!
ok, the problem is this: you''re telling it to use the destination color key for it, but the destination surface hasn''t defined a color key yet.
that really annoyed me and took me a life time to figure it out.
so just setup a color key in all of your surfaces and you''re done. nothing''s wrong with that code
- Pouya / FOO!!!
#define PURE_STUPIDITY 128 PROGRAMMERS
ok, the problem is this: you''re telling it to use the destination color key for it, but the destination surface hasn''t defined a color key yet.
that really annoyed me and took me a life time to figure it out.
so just setup a color key in all of your surfaces and you''re done. nothing''s wrong with that code
- Pouya / FOO!!!
#define PURE_STUPIDITY 128 PROGRAMMERS
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement