[SDL] N00b questions... (I'm sorry! Stop slapping me with old fish ; ))

Ochal Christophe ochal at kefren.be
Thu Dec 7 13:58:26 PST 2006


On Thu, 2006-12-07 at 21:58 +0100, David Olofson wrote:

> > Yea, but i want to dump several things into one file instead of lots
> > of little files, so SDL_SaveBMP etc won't do, i think i have a
> > pretty decent idea of how to proceed tho... 
> 
> I see. Have a look at this then:
> 	http://www.kekkai.org/roger/sdl/rwops/rwops.html

Looks intresting, i'll have to look into that.

On a sidenote, can someone tell me why the following doesn't work?

fwrite((screen->format->BitsPerPixel, sizeof(unsigned int),
(sizeof(unsigned int)/sizeof(unsigned int)), file);

Where screen is a *Surface and file a filepointer, i know it's related
to the way i passed screen->format->BitsPerPixel, fwrite expects a
pointer to the value of BitsPerPixel, but for the life of me i can't
remember how it was done, digged up my C manuals to read up on pointers
again, but if someone could tell me what my obvious error is i'd
appreciate it ;)





More information about the SDL mailing list