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.
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
Unfortunately, OD Beta has a major regression with SDL joystick support,
as it always reports buttons as keyboard keys instead of actual buttons.
This partially breaks external keyboard support, where e.g. space no
longer acts as expected.
However, on balance, OD Beta is better than the 2014 firmware at this
point.
There is no reason for these functions to be in the header (inlining
won't benefit them one bit).
I put them in the header originally only because of the weird state
SourceS was in back then.
It was only used in one place, which did not use va_list.
Looking at the original issue, my guess was whatever this was meant to
work around was an issue in DevilutionX code at the time.
In multiplayer, the hash and block tables are kept around between the
saves (presumably to improve performance).
When leaving the game, they should be cleared.
Clearing of the tables is handled by `Archive::Close` in `mpqapi.cpp`.
After 135f5e03c7,
which moved the archive closing inside `pfile_write_hero`, the tables
were no longer cleared on `pfile_flush_W` (because the archive was
already closed when it was called).
To fix the issue, this commit adds a `clear_tables` argument
to `pfile_write_hero` and removes the `pfile_flush_W` method.
Bug reported and root cause found by @Eider-McDuck:
> Example to reproduce: Have 2 vanilla savegames, join a game with the first,
> then leave, then join a game with the second, then drop an item on the floor.
`DVL_ERROR_HANDLE_EOF` was defined incorrectly on Windows.
These error codes are used and returned by Storm. Moves them
from `miniwin.h` to `storm.h`.
Also adds `STORM_ERROR_FILE_NOT_FOUND`, to be used in a follow-up PR.
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