ColorBetween function. Fail.
#5

Quote:
Originally Posted by Crayder
Посмотреть сообщение
I always have sucked with shifts. Could you show me what you mean?
So first of all write it like this:

Код:
stock HexToInt(hexcolor, &r, &g, &b, &a)
{
    r = ( hexcolor >> 24) & 0xFF;
    g = ( hexcolor >> 16 ) & 0xFF;
    b = ( hexcolor >> 8 ) & 0xFF;
    a = hexcolor & 0xFF;
}
If that doesn't work...write it like this (Thats the other shift):

Код:
stock HexToInt(hexcolor, &r, &g, &b, &a)
{
    r = ( hexcolor >>> 24) & 0xFF;
    g = ( hexcolor >>> 16 ) & 0xFF;
    b = ( hexcolor >>> 8 ) & 0xFF;
    a = hexcolor & 0xFF;
}
Greekz
Reply


Messages In This Thread
ColorBetween function. Fail. - by Crayder - 19.03.2015, 07:02
AW: ColorBetween function. Fail. - by Kaliber - 19.03.2015, 07:19
Re: ColorBetween function. Fail. - by Vince - 19.03.2015, 10:22
Re: ColorBetween function. Fail. - by Crayder - 19.03.2015, 12:06
AW: Re: ColorBetween function. Fail. - by Kaliber - 19.03.2015, 12:17
Re: ColorBetween function. Fail. - by Vince - 19.03.2015, 14:41
Re: ColorBetween function. Fail. - by Crayder - 19.03.2015, 20:43

Forum Jump:


Users browsing this thread: 2 Guest(s)