GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


endians on floats by Miptex
1
 
//http://msdlocal.ebi.ac.uk/docs/vega/pages/appx_d_iff.htm

/**** Change endian for LONG, ULONG and FLOAT ****/

void SwapL(register void *Val)
{
    register UBYTE T;

    T = ((UBYTE *)Val)[0];
    ((UBYTE *)Val)[0] = ((UBYTE *)Val)[3];
    ((UBYTE *)Val)[3] = T;
    T = ((UBYTE *)Val)[1];
    ((UBYTE *)Val)[1] = ((UBYTE *)Val)[2];
    ((UBYTE *)Val)[2] = T;
}