• Advertisement

Archived

This topic is now archived and is closed to further replies.

Player Colors

This topic is 6696 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Tank2k

When your graphics card doesn't support source colorkeys than DirectDraw will emulate it in software. To do this in hardware you have to buy a graphics card which supports that.

VirtualNext

Share this post


Link to post
Share on other sites
Advertisement
Hi,
it DOES support both destination and source color keying, have a look at your documentation and change the flags. I guess nearly every card built after 1997 should support this, so this doesn't seem to be a problem to me.

It's not possible to do in hardware when your hardware doesn't support it, that's life, but I guess it normally should support it.

CU

------------------
Skullpture Entertainment
#40842461

Share this post


Link to post
Share on other sites
Thanks, that gives me some hope. I'll look at it again.

BTW, does everything default to software emulation if your hardware
doesn't support it? I remember trying to to use Blt and DDBLTFX to do
some surface stretching, but the function failed on me, so I had to write
it myself to get around it. Should this also be emulated in software?

It was setup like this as I remember it:

ZeroMemory( &ddbltfx, sizeof(DDBLTFX) );
ddbltfx.dwSize = sizeof(DDBLTFX);
ddbltfx.dwDDFX = DDBLTFX_ARITHSTRETCHY;

// Stretch the test_surface to the entire back surface
back_surface->Blt(NULL, test_surface, NULL, DDBLT_DDFX | DDBLT_WAIT, &ddbltfx);

-Tank2k

Share this post


Link to post
Share on other sites
I got it to work finally. Thanks! (couldn't get DirectX
stretching to work however, oh well).

-Tank2k

Share this post


Link to post
Share on other sites
I am working on a 2D tile-based game and I would like to create
different player colors for my units like Warcraft II. I thought
I could use 2 different transparency colors, one for the player
color on the unit, and one for the background color around the unit.
I could then blt the player color on the unit surface (using a source
colorkey), and the blt the complete unit to the background (using a
dest colorkey).

However DirectX tells me it does not support source colorkey blts,
only dest colorkey blts!

Well, I really don't want to do this in software, as it would be
simply too slow. Does anyone have advice how I would do this? Is it
still possible in hardware (DirectX)?

-Tank2k

Share this post


Link to post
Share on other sites
DirectDraw streatching sucks anyways. It doesn't do any filtering, so it looks all blocky.

Share this post


Link to post
Share on other sites

  • Advertisement