Archived

This topic is now archived and is closed to further replies.

Loading Resources from a PAK File

This topic is 5539 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Or a zip file, whatever. I''ve been looking for a library to help automate this process for me, but I''m not finding what I''m looking for. Just a simple library to extract files from a zip file, that doesn''t need another dll in the directory.

Share this post


Link to post
Share on other sites
This is the cunning way I retrofitted this.

I had a lot of modules to my engine that loaded things when passed a filename - models, textures, etc.

I wanted a pak file to encompass all my resources but I didn''t really want to go changing all my code.

So, I wrote a wrapper for zlib that would inflate a zip file containing all the game resources to a subdirectory and then SetCurrentDirectory to the new directory.

All the resource loading code would now find everything in the default directory as it expected without having to change any code )

At application exit, the subdirectory is deleted.

Hope this gives you some ideas...



www.coldcity.com
code, pics, life

Share this post


Link to post
Share on other sites