[SDL] Handling a large number of image files

Tom Davies tdavies at gmail.com
Mon May 14 14:57:43 PDT 2007


Thanks for the tips. I am playing around with IMG_ReadXPMFromArray, and so
far
everything compiles okay but it crashes as soon as I call that function and
I can't
figure out why. I will continue to play around with it and try and debug the
problem
though. Thanks!

On 5/14/07, neil at cloudsprinter.com <neil at cloudsprinter.com> wrote:
>
>
>
> ** 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!
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070514/25771926/attachment.html 


More information about the SDL mailing list