`std::make_unique<T[]>(size)` always zero-initalizes the array.
C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
Previously, we always loaded entire videos in memory before playing them.
`libsmacker` does not provide a streaming API but it does provide a
`FILE *` file pointer API.
We now take advantage of the `FILE *` API by streaming the videos on
platforms that support `fopencookie`.
This means faster startup and less memory usage on these platforms.
This option completely disables all audio handling, including audio
loading code and dependencies.
Dialog text length is estimated to be somewhere between
Cain and Griswold speed.
SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.
1. Cleans up SVidVideoMode detection.
2. For devices where detection is not possible but it is known
to work, adds an `SDL1_FORCE_SVID_VIDEO_MODE` define.
SErrGet/SetLastError were not propagating errors from 3rdParty/StormLib
because StormLib uses native Windows functions on Windows and defines
its own on Linux.
Also removes storm_full.h
1. Removes a lock around allocation. `malloc` is required to be thread-safe in C11.
2. Defines it as a macro so that:
1. We provide the correct location for the OOM error.
2. We get better attribution from memory profilers.
SBmpLoadImage tried to get the size of the rest of the file incorrectly
by subtracting the current file position from the total size.
This was incorrect because file positions do not always begin at 0.
The only semi-portable way to get a size from file positions is to
subtract two file positions.