Friday, October 21, 2016

c++ - How can I package and read multiple asset files into/from one file?


I want to somehow "pack" (not compress) multiple game files into one bigger file. Something like Valve's .gcf, where reading from the application should be easy; like accessing an ordinary stored file.


I'm aiming for some kind of simple use, something like:


my_asset_file->setAssetFile(ASSET_FOLDER + '/file.ext');
Model *m = new Model();
m->loadFromTxtFile(my_asset_file->openTxtFile('models/props/lamp.obj'));

Answer




PhysicsFS should be able to handle it.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...