User Profile

Collapse

Profile Sidebar

Collapse
MrL0co
MrL0co
Last Activity: Jan 26 '10, 10:35 AM
Joined: Jan 23 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MrL0co
    replied to 4-byte char from hex to float
    in C
    tnx newb16 that works
    See more | Go to post

    Leave a comment:


  • MrL0co
    started a topic 4-byte char from hex to float
    in C

    4-byte char from hex to float

    he there,
    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);
    ...
    See more | Go to post
No activity results to display
Show More
Working...