J
John.Doe.UK
I have a macro which gets a bit from an unsigned char in a 2d array.
#define GET_PIX(x,y) (array[y][x / 8] >> (7 - x % 8)) & 1
I now need to work out a macro to set a pix to a value of 1 or 0
depending on what number I pass it. Any help would be very much
appreciated.
#define GET_PIX(x,y) (array[y][x / 8] >> (7 - x % 8)) & 1
I now need to work out a macro to set a pix to a value of 1 or 0
depending on what number I pass it. Any help would be very much
appreciated.