Player color alpha change.
#2

ANY_COLOR & 0x000000FF will return the alpha part only. This ranges from 0 (00) to 255 (FF)
So you could use this to set the alpha to whatever you like:

NEW_COL = ANY_COLOR - (ANY_COLOR & 0x000000FF) + new_alpha;

Where alpha should not be bigger than 255.
There might be more efficient methods, but this was the first one that came up in my mind.
Reply


Messages In This Thread
Player color alpha change. - by Zh3r0 - 20.06.2011, 12:06
Re: Player color alpha change. - by Mauzen - 20.06.2011, 12:25
Re: Player color alpha change. - by Alvord - 20.06.2011, 12:34
Re: Player color alpha change. - by Zh3r0 - 20.06.2011, 12:38
Re: Player color alpha change. - by Babul - 20.06.2011, 13:16
Re: Player color alpha change. - by Alvord - 20.06.2011, 14:55

Forum Jump:


Users browsing this thread: 1 Guest(s)