Sign in to follow this  
CodeZero

Faking an eof in a PAK file

Recommended Posts

So I wrote up a simple PAK file class that takes files and combines them end to end to form one large file, like a lot of games have these days to store their resources. I can easily work with this class in my own code, but occasionally I have to work with other code that requires a FILE* to load data. My question is can I insert certain characters in between my files to indicate eof, thus allowing me to pass FILE*'s to other code and they will stop when the file is supposed to be done? What if this "other code" needs the file opened in binary format? What's the difference between binary and text, really? If none of this will work, how do other PAK file work? Thanks, Jake

Share this post


Link to post
Share on other sites
Most games use libraries which are able to load resources (images, meshes, sounds...) from memory instead of loading them from a file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this