Hello all,
I have a bunch of images, fonts, sounds and musics that I want to pack into a single binary file. I know there are loadFromMemory functions, but how to I write these objects in the memory in the first place?
In an ideal world I would have something like this:
// rscMap is a std::map<string, X*> where X can be sf::Sound, sf::Texture, etc...
std::ofstream file("my-pack", ios_base::binary);
file << rscMap.size();
for (auto resource : rscMap){
file << resource.first;
file << sizeof(*resource.second);
file << *resouce.second;
}
If there is a library that already does that I would like to know as well.
Thanks!