Original Post
Hello,
Is this the proper way to determine whether or not bit 5 in this byte is 0 (also the array is an unsigned char):
If the bit is 0 then I proceed to flip the image - I get this information to check the fifth bit in the 17th offset to flip the TGA image from here.
Thanks for your help!
// This checks to see if the fifth bit in the 17th offset is 0
// If it is then the image is upside down so we need to flip it
if((tgaInfo[5] & (1 << 11) ? 0 : 1))
{
if(flipImageVertically() == NULL)
return 0;
}
|