Open mewmew opened 8 years ago
This is a great idea.
Currently, I think it will be nice if Mac users can download a binary package with libtomcrypt from a Freeablo website which will be detected by cmake.
I have forked StormLib for DGEngine and have removed support for newer versions of MPQ, which diablo doesn't use. I also removed some write functions as I don't use those. I haven't tested compiling with other OSes other than Windows, but it should work.
https://github.com/dgengin/StormLib
I use this version to compile my fork of PhysicsFS with MPQ support.
https://github.com/dgengin/physfs
I don't know how freeablo uses StormLib, but if you migrate to PhysicsFS, I have added MPQ support, so it's easier to read from folder, MPQ or zip as PhysicsFS abstracts all that. Otherwise, mac users can just use my fork of StormLib that doesn't include libtomcrypt nor zlib, bzip, etc.
I have also updated DGEngine to use the new lib.
To facilitate debugging and implementation of other features it may be worth considering adding support for using files from extracted MPQ archives.
Zezula's MPQ Editor may easily be used to extract the
diabdat.mpq
archive, and Freeablo could then provide support for reading the extracted files rather then extracting them on the fly from the MPQ archive.An option for using extracted MPQ archives could be added to the launcher.
Note that this feature would solve issue #225 and other Stormlib related issues. Furthermore, it would definitely help implement support for modern file formats in Freeablo (i.e. issue #23), as PNG files could easily be added alongside of CEL files to add the PNG decoding and rendering logic.