[SDL] Handling a large number of image files

Kuon - Nicolas Goy - 時期精霊 (Goyman.com SA) - 675 kuon at goyman.com
Wed May 16 04:41:40 PDT 2007


On 14 May 2007, at 5:38 PM, Tom Davies wrote:

> Hi all,
> ...

In our game, all data files are wrapped inside one big file, it's  
like a tar archive but with some tricks to avoid any "unarchiving".

We simply have a little lib wich replace fopen, and return a stream  
to the data. (the api looks like fopenInArchive(archivePath,  
filenPathInArchive, mode);)

If you don't want to create your own format, I suggest you use zip  
with a password. Then you hardcode the password in a disturbing way  
(read, not char *pass = "foo" in your code, but something like char  
*pass = getpass() and getpass do some calculations based on the age  
of the captain and such (you will find plenty of information about  
that if you search the web for hiding serial numbers logic in your  
code or something like that)).

There are OpenSource zip lib around, some in regular zip format,  
others with variations.

Regards

--
Kuon

"Don't press that button."
http://goyman.com/




More information about the SDL mailing list