I am trying to read out a .md3 file.
i am stuck on a point where i have to convert a 8-bit hexedecimal char to a float.
and change it from little endian to big endian
this is how far i got
Code:
unsigned char tmp[4]; f32 test; fread(&tmp, 1, 4, f); test = bitshiftf32(tmp); f32 bitshiftf32(unsigned char val[4]) { return val[0]|(val[1]<<8)|(val[2]<<16)|(val[3]<<24);