Hex value of Magenta?...

Mithrandel
04-14-2002, 11:18 PM
Well, I was originally using pure black as my transparent color. But then I got to thinking... why not use magenta as my color key, instead of making sure that every non-transparent black has a shade of blue in them?

So, I made a few changes to my ColorKey routine, thus...

'Set up ColorKey
CKey.high = &hFF00FF
CKey.low = &hFF00FF

Now, supposedly, hFF00FF is the value for magenta. But dangit, now all my picture resources have this absurd little bright purple square around them! It's not exactly awe-inspiring, and now my subconcious is laughing at me! Heeeelp! =P

Squirm
04-15-2002, 03:28 AM
Setting the values straight like that doesnt actually work, you need something like this:

Dim PixForm As DDPIXELFORMAT
Dim CKey As DDCOLORKEY

Surface.GetPixelFormat PixForm
CKey.low = PixForm.lBBitMask + PixForm.lRBitMask
CKey.high = CKey.low
Surface.SetColorKey DDCKEY_SRCBLT, CKey

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum