I finished the Win32 C++ GAME_Labyrinth API with DireXt 9
and
I want to gather all .bmp textures, .txt infos and .wav soundtracks
in 3 binaries Music.dat Textures.dat TextInfos.dat
I know to store text into binary file
Can I store generally anything into a binary?
Can i store files into a binary and export them with sompe pointers when needed?
How? Any documenation with our without example code on that?
( would like example code)
You can compress all resources in a zip file and add them to executable as a string buffer with known length. Then extract them at runtime using some zip decompression algorithm and you are done.
Linux ELF format does not have resources, this methods works regarding of the operating system. This also prevent people messing with resource editors too :)
There are cases when this method also lower executable size instead of growing (zip decompression take 40 KB executable size overhead).
You don't have to store it in the executable. You can store resources in a DLL as well. If you don't want to go the WIN32 resource route then there are other options.