Jump to content

  • Log In with Google      Sign In   
  • Create Account


DX-Transparency problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 ECKILLER   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 January 2000 - 01:43 PM

Hi, For those who have responded to my previous post thanks, i''m making progress. Hre''s my new problem. I first blt my logo to the screen, which works fine, then i blit my background to the screen and begin animating. However my sprite''s background is being showed, the color keying isnt working. Here''s my code that you may need to help. Also my function order is correct in the calling of them, these are just the definitions. void Animate_Images() { RECT rect; // background lpDDSBack->BltFast(0,0,dojo,NULL, DDBLTFAST_WAIT/DDBLTFAST_SRCCOLORKEY); rect.left = 0; rect.top = 0; rect.bottom = 200; rect.right = 200; // draw the current sprite cell lpDDSBack->BltFast(0,200,arr_anime[current_image],&rect,DDBL TFAST_WAIT/DDBLTFAST_SRCCOLORKEY); lpDDSPrimary->Flip(0,DDFLIP_WAIT); current_image++; if(current_image >= IMAGE_COUNT) current_image = 0; Sleep(200); } void Set_Color_Key() { DDPIXELFORMAT ddpf; ddpf.dwSize = sizeof(ddpf); lpDDSPrimary->GetPixelFormat(&ddpf); // determine proper key for pixel format, green KeyColor = ddpf.dwGBitMask; // set color keys DDCOLORKEY key; key.dwColorSpaceHighValue = KeyColor; key.dwColorSpaceLowValue = KeyColor; for (int i = 0; i < IMAGE_COUNT; i++) arr_anime->SetColorKey(DDCKEY_SRCBLT, &key); dojo->SetColorKey(DDCKEY_SRCBLT, &key); } void Draw_Logo() { // draw my logo lpDDSBack->BltFast(0,0,logo,NULL,DDBLTFAST_WAIT); first_run = false; lpDDSPrimary->Flip(0,DDFLIP_WAIT); Sleep(2000); } ECKILLER

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS