The new approach only makes 2 read calls and does not do any seeks.
It is also less general and is internal to `art.cpp`, allowing us to
simplify it somewhat.
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.
Fix for Vita
Update to use free functions
Use std::optional to allow setting empty paths
Change header inclusion order
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Use std::optional to allow setting empty paths
Apply clang-format
Temporary commit
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.