[SDL] about initialization of SDL on no-x86

huangwei at sunplus.com.cn huangwei at sunplus.com.cn
Sun Jan 19 22:51:01 PST 2003


or of course if you know how much data there is (the entire file for
instance, or you know theres a block of 1k) you can fread into a buffer and
then decode it from there :P

----- Original Message -----
From: "Neil Bradley" <nb at synthcom.com>
To: <sdl at libsdl.org>
Sent: Monday, January 06, 2003 1:20 PM
Subject: Re: [SDL] Endian Conversion?


> > > fwrite(temp,1,1,f);
> > > temp=((unsigned int)value)>>8;
> > > fwrite(temp,1,1,f);
> > > temp=((unsigned int)value)>>16;
> > > fwrite(temp,1,1,f);
> > > temp=((unsigned int)value)>>24;
> > > fwrite(temp,1,1,f);
> > You probably meant
> > fwrite(&temp, 1, 1, f);
> > (pointer to the char)
>
> Or better yet, how 'bout fputc/fgetc? Much better/faster than fwrite by a
> *LONG* shot.
>
> -->Neil
>
> --------------------------------------------------------------------------
-----
> Neil Bradley            In the land of the blind, the one eyed man is not
> Synthcom Systems, Inc.  king - he's a prisoner.
> ICQ #29402898
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list