Now that the synchronization code has been improved, re-enable it
by default, remove the -newsync parameter and add back -oldsync
instead for users who want to opt out.
This fixes#358 and #489.
The previous -newsync code wasn't too bad but was basically a hacky
version of a PID controller. So replace this with an actual PID
controller with tuning parameters manually tuned based on an evening
of experimentation. So far this seems to be a significant improvement
over the old -newsync code.
Supports both -version and --version, even though the later breaks
the normal convention of Doom parameters, it is common enough with
any general program that it should be useful to include in this.
I'm not sure there are any mods for Strife people would want to
autoload on startup every time, but this is at least consistent with
other executables.
tempstring[] is currently 80 bytes which means that the quickload
message gets truncated for long savegame names. I believe this was
always an issue (even in Vanilla?) but recent changes to use safe
string functions (commit 040ca1cfb5) surfaced the bug.
This fixes#1069.
Implements most of #1052, adding a new config file variable named
`autoload_path` that is auto-configured on first run. The actual
files are autoloaded from subdirectories named by IWAD file name that
are automatically created. It's sufficient to just drop .WAD and .DEH
files into the appropriate directory to have them automatically load
on startup.
Also add a -noautoload command line parameter to disable the autoload
functionality on occasion if desired.
Resolve warning about missing header for strcmp(), and move Unix-
specific includes to the Unix-specific #ifdef section. Remove include
of unistd.h since it does not appear to be needed anyway.
640x480 was the default for a long time but modern monitors are higher
resolution and now we use hardware scaling there's no reason to hold
back for any CPU reason. 800x600 is also a good default because on 2x
retina displays it doubles up to 1600x1200 which is a perfect integer
scale-up.
The d_type field in struct dirent is not mandated by POSIX and is missing
e.g. on MinGW where this leads to a failing build. Fall back to using
stat() here.
A full string match still counts as "starting with". This fixes a bug
with substitute MIDI packs where substitutions were not being loaded
when the full hash was specified.
This allows additional music packs with other filenames beyond the
"well-known" ones. This opens the door for eg. music packs for PWADs
if that's something people want.
This fixes#1051.
Now that this works regardless of the music output type, it's no longer
necessary to hide this behind a conditional widget. So just always show
it.
Part of #440 but will also aid discoverability for music packs
configuration, as part of #1051.
Using Mix_HookMusic() to generate the OPL output stream works fine if
you only ever play OPL music and don't want to use the normal music
output functionality of SDL_mixer. However, now that it's possible to
use substitute music packs with any music output type, this is no longer
the case. Using Mix_HookMusic() disables normal output from eg. Ogg and
FLAC playback. As an alternative, use the post-mix hook and mix the
output from the OPL emulator there.
Cleanup fix as part of #440.
As described in #440, it's counterintuitive that music packs can only
be used if the music device is configured as native MIDI mode. Factor
the music pack part of `i_sdlmusic.c` out into a new file,
`i_musicpack.c`, separating the code that deals specifically with music
packs from the code that deals with MIDIs. This is easily expressible
as a `music_module_t`, doesn't result in a huge amount of duplicated
code, and only requires some minor hooks in `i_sound.c` to support the
overrides.
As an added bonus, the code in both files ends up being significantly
simpler as a result of the refactoring.
This fixes#440 and fixes#528.
We already show a message if substitutions are loaded from a config
file, so show a similar message as well if substitutions are found
based on filenames.
This replaces the widget that controls the music pack path with a
window action button that just opens the configured music pack path.
The path is now automatically created and populated with an
explanatory README file that should explain the purpose to users.
Another major step in implementing #1051.
Currently the user has to create a music pack directory themselves and
configure the path to it in the setup tool. To make configuration
simpler, just create a directory automatically along with a README file
about how to use it, since the user can now just dump files in this
directory.
Part of #1051.
It may be desirable to wrap a window action in a txt_conditional_t
sometimes so that actions dynamically appear based on how the config
changes. So change the TXT_SetWindowAction() API to accept any widget
instead of mandating a txt_window_action_t.
Music packs may be in .flac or .ogg format, so check for both by
using a template with .{ext} where the .flac or .ogg should go. This
also allows the .{ext} syntax to be used in config files.
Part of #1051.