Quote:
Originally Posted by Kar
pawn Код:
stock ShiftRGBAToABGR(&color) { new r, g, b, a; r = (color >>> 24); g = (color >>> 16 & 0xFF); b = (color >>> 8 & 0xFF); a = (color & 0xFF); color = (a & 0xFF) | ((b & 0xFF) << 8) | ((g & 0xFF) << 16) | (r << 24); return color; }
|
Quote:
Originally Posted by ******
From YSI y_cell:
pawn Код:
stock Cell_ReverseBytes(data) { // Swap all bytes. return (data >>> 24) | ((data & 0x00FF0000) >> 8) | ((data & 0x0000FF00) << 8) | (data << 24); }
|
Or just use the
swapchars function of core.inc
![afro](images/smilies/mrgreen.gif)
.
I hope that i have helped
![Tongue](images/smilies/razz.gif)
.