19.03.2015, 12:17
Quote:
I always have sucked with shifts. Could you show me what you mean?
|
Код:
stock HexToInt(hexcolor, &r, &g, &b, &a) { r = ( hexcolor >> 24) & 0xFF; g = ( hexcolor >> 16 ) & 0xFF; b = ( hexcolor >> 8 ) & 0xFF; a = hexcolor & 0xFF; }
Код:
stock HexToInt(hexcolor, &r, &g, &b, &a) { r = ( hexcolor >>> 24) & 0xFF; g = ( hexcolor >>> 16 ) & 0xFF; b = ( hexcolor >>> 8 ) & 0xFF; a = hexcolor & 0xFF; }