* mpqapi FStreamWrapper: Fix silly bugs
* mpqapi cleanup
1. Do not rely on stream positions for getting the initial file size.
2. Remove most `seek` calls that were unnecessary.
3. Replace magic numbers with constants.
4. A class to manage archive lifetime and all associated data.
* Revert "Revert "mpqapi: Log all fstream calls""
This reverts commit e08007670f.
* mpqapi: Fix saves on Amiga
Works around https://github.com/bebbo/libnix/issues/30
* mpqapi: Fix logging format specifiers
This fixes fstream logging on Amiga
* mpqapi: Do not ResizeFile unless it was modified
* Add tests for file_util
* mpqapi: Replace malloc/free with new[]/delete[]
* mpqapi: Keep track of size instead of using tellp
This reduces log noise and reliance on `tellp`.
* mpqapi: Refactor mpqapi_write_file_contents
* mpqapi: Ensure we don't seekp beyond EOF on Amiga
* mpqapi: Minor fixes
* mpqapi: Fix FSTREAM_CHECK on Windows
* mpqapi: Remove undefined methods from header
With this change, all exported declarations of Devilution are now
compatible with the C-ABI; that is, all declarations of Source/*.h.
This makes it possible to link against DevilutionX from mods written in
other languages than C++, for instance Rust, Go or Python.
Updates #612.
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.
Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).