Advertisement

DD Windowed mode transparency

Started by January 16, 2001 11:48 AM
0 comments, last by Yanroy 24 years ago
I noticed last night that my game has a little visual artifact when running in windowed mode. It seems that the trasparency doesn''t work. I can see the transparent color instead of the background, but it works fine in exclusive mode. Any ideas? --------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming

You are unique. Just like everybody else.

"Mechanical engineers design weapons; civil engineers design targets."

Yanroy@usa.com

Visit the ROAD Programming Website for more programming help.

--------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor

Yanroy@usa.com

How do you set the transparency color? Do you have a preset color, or do you read a color from the image?

The way I do it, is the first pixel in each image is the transparency color, and what I do is I lock the surface, and read this color value so I can set a source color key etc...

In windowed mode, what happened in my code, is the Lock() function was failing. This was corrected by adding the LOCK_WAIT flag, or by calling lock in a loop.

At the very least, try checking the the return value when you call SetColorKey.

This topic is closed to new replies.

Advertisement