Loading Resources from a PAK File
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.

have you tried using zlib (zlib.lib). It can both read and write zip files and compressed buffers.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
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
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
[size="2"]www.coldcity.com code, art, life
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement