and is only logical operator in blitzmax while & is bitwise operator.
Vorderman: sorry had an 00 too much in the red line.
This one should work:
alpha = argb & $FF000000
red = argb & $00FF0000
green = argb &0000FF00
blue = argb &$000000FF
( the shr does nothing else than that. It just shifts the stuff to right to "kill" the 0s ... so it is an operation that is not needed if you know the exact bit length )
Vorderman: sorry had an 00 too much in the red line.
This one should work:
alpha = argb & $FF000000
red = argb & $00FF0000
green = argb &0000FF00
blue = argb &$000000FF
( the shr does nothing else than that. It just shifts the stuff to right to "kill" the 0s ... so it is an operation that is not needed if you know the exact bit length )