[SDL] Handling a large number of image files
neil at cloudsprinter.com
neil at cloudsprinter.com
Mon May 14 09:52:18 PDT 2007
** I really am good at this email business sorry to minor sp*m but here is the
same message with the correct subject line **
such as the user would be
> able to modify the files themselves (which we may not want), and it
> becomes difficult to handle and load a whole lot of individual files. I am
> toying with writing a little program that stores a number of SDL_Surfaces
> in a binary file,
>
to prevent the end user from altering image files, you can either use .xpm
fromat and store them in a header file they are compiled into the final binary,
also i havnt tried this myself, but by using a bin to hex program you can keep
your files in png format in a header file and use SDL_Rwops to retrive them in
the code.
I have used the .xpm method alot, just use the gimp to re-save them as xpms,
then put them all into a header file and use XPM_Readfromarray to get them. or
you can use imagemajick but that puts pure colors as thier names which the
readfromarray function cant cope ie '*'="white" instead of '*'=#ffffff (or at
least didnt cope last time i checked )
hope this makes sence and is a little help!
More information about the SDL
mailing list