Jump to content

  • Log In with Google      Sign In   
  • Create Account


Catch 22


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
2 replies to this topic

#1 frizb   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 December 1999 - 08:51 AM


I have a predicament. I can animate my sprites with BltFast, but then there isn't any colorkey. If I use Blt, I get the colorkey, but no animation.

I thought setting up the rect structure like this would work for Blt. (My sprite is 64x64)
============================================
rect.left = sprite.x;
rect.top = sprite.x;
rect.right = sprite.x + 64;
rect.bottom = sprite.y + 64;

lpddsback->Blt(&rect2, lpddsoff2, &rect2, DDBLT_KEYSRC, NULL);
========================================
If I have the rect set to (0,0,64,64) it works but no animation. With it set like above, nothing shows, except every few seconds I see a faint blip in the corner.
If I use the BltFast from below with the rect set to (0,0,64,64) it animates fine, but no colorkey of course.
========================================

lpddsback->BltFast(sprite.x,sprite.y,lpddsoff2, &rect2, DDBLTFAST_WAIT); // Works
========================================

Am I going about this the wrong way?

------------------
Still Learning...


Sponsor:

#2 Lich   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 December 1999 - 10:56 PM

You can do a color key blit with BltFast as well, using the flag DDBLTFAST_SRCCOLORKEY.

------------------
Lich


#3 frizb   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 December 1999 - 08:51 AM

Oh. How I'm red-faced. How did I miss that? Thanks, friz

ps-Not to mention I forgot to use a source and dest rect above. Its all good now though.

------------------
Still Learning...





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