Copying a colorkey mask to another surface

Hullo there,
Is there anyway to copy the pixels with the colorkey instead of the ones
without?
I want to move a mask from a surface to another (in order to blit the
silhouette of a sprite in white) and haven’t been able to find an easy
way to do it.
I hacked the SDL code to contain an INVERSE colorkey flag, and just
negated the check for the colorkey in the source, but I don’t know if
there is a better way to do it…

Yours sincerely,
/morten bek

Basically what you did is fine. Except you might want to do it without
hacking SDL:)On Mon, 8 May 2000, Morten Bek wrote:

Hullo there,
Is there anyway to copy the pixels with the colorkey instead of the ones
without?
I want to move a mask from a surface to another (in order to blit the
silhouette of a sprite in white) and haven’t been able to find an easy
way to do it.
I hacked the SDL code to contain an INVERSE colorkey flag, and just
negated the check for the colorkey in the source, but I don’t know if
there is a better way to do it…

Yours sincerely,
/morten bek

Martin

Bother! said Pooh turning off his computer. All the SMUT’S on CABLE TV!

Uhm, I’m not really sure how to do that… Do you mean writing the
colorkey copier outside of the SDL code? Is there anything special I
need to worry about for platform independence, or should I be fine just
memcopying everything??

Martin Donlon wrote:>

Basically what you did is fine. Except you might want to do it without
hacking SDL:)

On Mon, 8 May 2000, Morten Bek wrote:

Hullo there,
Is there anyway to copy the pixels with the colorkey instead of the ones
without?
I want to move a mask from a surface to another (in order to blit the
silhouette of a sprite in white) and haven’t been able to find an easy
way to do it.
I hacked the SDL code to contain an INVERSE colorkey flag, and just
negated the check for the colorkey in the source, but I don’t know if
there is a better way to do it…