[SDL] N00b questions... (I'm sorry! Stop slapping me with old fish ; ))
Ochal Christophe
ochal at kefren.be
Thu Dec 7 14:41:23 PST 2006
On Thu, 2006-12-07 at 17:43 -0500, James Barrett wrote:
> Ochal Christophe wrote:
> >
> > 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 ;)
>
> Wthout digging out my pointer reference, I think it's
>
> &screen->format->BitsPerPixel
Yep, it is, thx mate!
More information about the SDL
mailing list