Protect images on SDL

Started by
3 comments, last by evillive2 15 years, 4 months ago
How i include images (bmp) on exe using SDL. And how i load the images? Thanks in advance.
check my blog: http://indiegamedeveloper71.wordpress.com/
Advertisement
Hmm. I don't realy have an idea. I always put my images in a map where the exe is and then I load them. I don't know how you could put them in a exe or something that cannot be edited. Try google.
-----------------------------Please visit my GameDev Blog:http://red-dev.co.nr/
If this were a Windows only program these would be resources you can include in your program. You can find more information about using resources in Windows programs on Google and MSDN.

I don't know of a way to do this in Linux however I am sure it is possible.

Unless this is a commercial game (and by the nature of your question I assume it is not), why would you complicate your game by doing this? In most cases it is even considered a feature to allow the end user to modify the graphics especially if there is something they don't like.
Evillive2
SDL_RWops?
I have used SDL_RWops to add/remove images, sounds and other resources into SQLite databases however I didn't think of this until samuraicrow mentioned SDL_RWops. The benefit to this is that the procedure to import and read back is cross platform whereas I do not believe the same could be said for embedding directly into an executable.

Another option along the same lines although I have not used it personally is PhysFS.
Evillive2

This topic is closed to new replies.

Advertisement