Btw, sorry that I'm not on good terms with C++. I use only C.
Anyway, if you were to
Code: Select all
popen("find /path/to/Morrowind/Data\ Files","r");
You can even popen("find ...","r") it through multiple directories and append/overwrite files to the list. This way you could easily implement support for keeping mods/saves in user's home folder in Linux.
You would, however, need to implement a way of getting a list of all the files in a .bsa archive.
IMO best use something along these lines:
Code: Select all
enum filetype{
bsa, datafile, save, whatever
};
struct filename{
char *physical, *logical;
enum filetype type;
uint64 offset;
};
Another example would be: physical="./Morrowind.bsa/Meshes/whatEVER", logical="./meshes/whatever", type=bsa, offset=12345.
I'm not sure how .bsa works exactly, but I hope you the idea.