While it's definitely something that should be explored later on when libeuropa is a larger library, and has C ABI wrappers to better foster bindings between other languages like Rust and such, for now, libeuropa is both pretty entertwined with both the C++ standard library and STL, and still in heavy development, so I think doing this isn't a good move.
This completely redoes the garbage flags stuff I did before. OOPS. This seems a lot closer to the format, and also exports everything Starfighter has properly.
libpixel (suprisingly) still compiles, but depends on libraries in a very annoying manner that makes EuropaTools hard to compile. Also, I don't like stb_image_write.
Replace it with some hand-done structs and the simpler/faster/better `lodepng`.
This allows pak writer file data to cleanly come from one of two possible sources:
- A file on the filesystem (in which the PakWriter will open the file, tee it into the package file efficently, and then close it)
- A data buffer (which functions like before)
PakReader however will always output data buffers.
While working with scrc I made the pak files output sorted by size. This doesn't
seem to have helped with performance but I guess it might be nice to maybe
do the conversion in hand.. or just make the writer take a vector of pair to use.
PakReader won't read everything in ReadData(), it now only reads the header and TOC.
Files now need to be read in separately.
Adds progress bar to europa_pack_extractor.
Moved code around.
Don't have a tool for building "fresh" packages yet, but the "paktest" tests regurgitating a pak into a new pak file.
Usage is:
./paktest [pak file]
it will write to "new.pak" always, which meh. It's just a test utility.