This required the addition of a few exception handlers so to avoid #ifdef overuse I also added some #defines for non-Windows systems that allow using __try and __except directly in the code without #ifdef'ing them out.
UpdateSounds will not be called during screen wipes and the entire setup of this function suggests that this is not advisable at all.
The OpenAL stream updates were done deep inside this function implicitly.
This caused music to stop while a wipe was in progress. So in order to allow uninterrupted music playback during screen wipes the music updates need to be handled separately from sound updates and be called both in the main loop and the wipe loop.
I think that the OpenAL music updating should be offloaded to a separate thread but at least it's working now without causing interruptions during wipes.
- Viewheight change was delayed: Viewheight must be copied to player
structure as well as the PlayerPawn. Not sure if should actually use
deltaviewheight to spread the change out over a few tics instead of
being instant.
- Viewheight not preserved when travelling: player->viewheight must be
restored from pawn->ViewHeight, because the temporary player set it back
to the default viewheight.
- If palette index 255 happens to be white (e.g. as in Hexen), trying to
use white with DTA_FillColor would treat it as if you had never passed
it to DrawTexture().
- S_PrecacheLevel() must also mark currently playing sounds as
used. If we don't, the sound could be unloaded and the underlying
channel stopped without triggering a channel callback. That would leave
the code in s_sound.cpp thinking the sound is still playing even though
it isn't.
- Added an invalid channel check to FMODSoundRenderer::StopChannel() so
that orphan channels passed to it will be returned at least when
S_StopAllChannels() is called.
- OpenAL never actualy worked properly and was removed in later FMODs.
- Sound Manager was deprecated by Apple long ago and is not supported for
64-bit applications. It was also removed in later FMODs.
Tags are now handled by a tag manager class which stores sector/tag pairs. This way multiple entries can be added per sector.
Since UDMF does not have any arrays the additional tags are stored as a space separated string as 'MoreIDs'.
- When the OPL3 cores were added, DiskWriterIO was never updated to take
into account things like more than two OPL2 chips can be configured.
- DiskWriterIO no longer does any file writing directly. That function has
been split off into an OPLDump class, which has two specializations: one
for RDOS Play, and the other for DOSBox. If one chip is configured, it
dumps for a single OPL2, otherwise it dumps for an OPL3 (effectively
dual OPL2).
- TODO: Figure out why playback of raw OPL files doesn't sound nearly as
good as playing MIDI with the OPL emulation. It's probably something
simple I overlooked.
- Fixed: If you enlarged the game window (in windowed mode) so that the
window is bigger than the selected resolution, the menu would still take
its inputs from the portion in the upper left that matched the
resolution.