Age | Commit message (Collapse) | Author |
|
Once a game type (IWAD) has been selected, remember that selection
rather than resetting to the first item in the list when the window is
closed and reopened. This fixes #169 (thanks Alexandre Xavier).
|
|
Vanilla Doom allows warp with the IDCLEV cheat up to MAP40, though it
normally crashes. Match this behavior and set MAP40 as the maximum
rather than MAP34. This fixes #181 (thanks Alexandre Xavier).
|
|
In the C standards, malloc(0) may return NULL without indicating a
failure to allocate. As values read from the MIDI file may be
arbitrary, add one to the allocated length so that we always allocated
a positive value. This fixes #165 (thanks nmain).
|
|
Sanity check the handles passed to the i_sdlsound.c API functions and
ignore requests that involve channel numbers higher than 15. This
fixes a crash if the user sets the snd_channels config variable is set
to a high value. This fixes #149 (thanks Alexandre Xavier).
|
|
Don't launch the game if a server address has not been entered; show a
message to the user instead. This fixes #121.
|
|
Using the .mp3 extension in generated music config files carries an
implicit recommendation to use that format. There are a number of
reasons to prefer other formats. The biggest is that MP3 is patent
encumbered. Furthermore, while FLAC and Ogg Vorbis both support the
Vorbis comment format that allows metadata loop point tags to be
specified.
|
|
Use appropriate directory separator for OS when generating config file
paths. When generating config files, include a header line that
indicates what is being assigned.
|
|
This adds support for high quality music packs that replace Doom's
built-in MIDI music with digital recordings. In particular this allows
recordings of the Roland SC-55 to be used in Chocolate Doom. This is
the first essential step for bug #245.
|
|
Last argument to M_StringJoin needs to be NULL.
|
|
When configuring Chocolate Strife the sound dialog can become quite
tall, and the dialog is visibly uncentered vertically. Move it up
slightly to counterbalance it.
|
|
The function would return false on lines without a '=' character, but only if that character is at least the third one on the line. :)
Closes #376
|
|
An off-by-one error in the function caused the strings to be truncated
one character too early. Change the return value check so that
negative values are also interpreted as indicating truncation; this is
the behavior of the Win32 API.
|
|
Properly handle cases where a very small string buffer is specified.
|
|
Define TXT_{StringCopy,StringConcat,snprintf,vsnprintf} as analogs of
the m_misc.c versions so that the textscreen library does not need a
dependency on the Doom code, and change all textscreen code to use
these instead of unsafe functions. This fixes #372.
|
|
Use M_snprintf() or M_StringJoin() instead where appropriate.
This fixes #371.
|
|
The Windows API has an _snprintf function that is not the same as
Unix's snprintf(): if the string is truncated then no trailing NUL
character is appended. This makes the function unsafe. Define a
replacement/wrapper called M_snprintf that works the same but always
appends a trailing NUL, for safety on Windows and other OSes that
behave like this.
Do the same thing for vsnprintf(), and update HACKING to list
snprintf/vsnprintf as forbidden functions. This fixes #375;
thanks to Quasar for pointing out the different behavior of these
functions.
|
|
|
|
|
|
The change in commit 62b5c6028.. broke the compile.
|
|
Use snprintf() in place of sprintf(). This is part of fixing #371.
|
|
Use snprintf() in place of sprintf(). This is part of fixing #371.
|
|
Use snprintf() in place of sprintf(). This is part of fixing #371.
|
|
Use snprintf() or other functions in place of sprintf(). This is part
of fixing #371.
|
|
Mistake introduced in previous commit.
|
|
As part of this, add DIR_SEPARATOR_S as a string version of the
DIR_SEPARATOR macro. Change M_TempFile() to return a string allocated
on the C heap rather than the zone heap.
This is a first step towards fixing #371.
|
|
Use M_StringCopy() instead of strncpy() in the Dehacked code.
|
|
Vanilla Hexen makes you specify the demo name to play by giving
the plain lump name, eg. heretic -playdemo mydemo to load mydemo.lmp.
It doesn't work if you specify the extension or the full file path.
As a convenience and to match the behavior of Chocolate Doom, allow
paths and extensions.
Also rework the code for other games so that they're slightly more
consistent. This fixes #301.
|
|
Vanilla Heretic makes you specify the demo name to play by giving
the plain lump name, eg. heretic -playdemo mydemo to load mydemo.lmp.
It doesn't work if you specify the extension or the full file path.
As a convenience and to match the behavior of Chocolate Doom, allow
paths and extensions.
This fixes half of #301.
|
|
Remove some remaining uses of strncpy() and use M_StringCopy() instead.
|
|
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
|
|
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
|
|
Where a pointer is to a buffer that does not need to be mutable for
the operation of the function, use const char * instead. This avoids
some type errors where constant string are passed.
|
|
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
|
|
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
|
|
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
|
|
|
|
Just as M_StringCopy behaves the same as strlcpy(), M_StringConcat
behaves the same as strlcat(). Use this in one location.
|
|
It's more readable to write "M_StringEndsWith(..." than doing a bunch of
pointer arithmetic, and this is a common pattern. Also add
M_StringStartsWith, M_StringJoin and M_StringCopy. The latter is a
safe alternative for strcpy() that works the same as OpenBSD's
strlcpy(). Use these functions in a few places where it makes sense.
|
|
The released linuxdoom source had the devparm ticker dots at a spacing
of two pixels rather than four pixels (as used in Vanilla Doom). In
commit 4a31ec8fcee20e.. I changed this back to four pixel spacing, but
forgot to multiply the number of tics to adjust as appropriate. Fix
this so that the dots are calculated just like Vanilla Doom is.
Thanks to _bruce_ for pointing this out on Doomworld, and to
Alexandre-Xavier for questioning my reasoning when I wasn't convinced
that the current behavior was wrong. This fixes #360.
|
|
Vanilla Hexen allows the game startup to be aborted by pressing the
escape key. This can also be used to abort netgame startup. Add back
this functionality by polling the SDL event loop; this feature only
works if the graphical startup is enabled, but that's good enough.
|
|
Thanks to Brad Harding for the bug report. This fixes #319.
|
|
Remove special logic for setting a scale factor (2x, 3x, etc.) when
running fullscreen instead of windowed. This fixes a crash due to the
fact that I_GraphicsCheckCommandLine() is called before SDL's video
subsystem is initialized.
This makes -2 identical to -geometry 640x480, which is arguably a
better (more easily comprehensible) behavior.
Thanks to Fabian Greffrath for reporting the bug. This fixes #338.
|
|
Doom, Heretic, Hexen and Strife have different default SFX and music
volumes. Make sure the setup tool sets the appropriate default when
creating a new configuration file.
Thanks to Alexandre-Xavier for reporting this and providing the
correct defaults. This fixes #347.
|
|
Strife's default music volume is 13 as opposed to Doom's value of 8.
This was apparently not changed during the development of Chocolate
Strife. Thanks to Alexandre-Xavier for noticing this and providing the
correct value (bug #347).
|
|
There is no real scan code for the PrintScreen key under DOS, but it
is convenient to be able to bind it as a screenshot key. Define a
"fake" scancode (126) to represent PrintScreen so that it can be
represented as a key binding in configuration files. Also add some
comments/notes to the scantokey[] lookup table.
This fixes #369.
|
|
|
|
commit 42faefce1fd03 added code to set the GUS patch path
automatically when the BFG Edition is installed, but this caused
problems because gusconf.c is not included as part of the build for
the setup tool. Use D_SetVariable() instead which accomplishes the
same thing without a hard dependency.
|
|
It is useful to be able to set variables through an API provided by
the config module; this means that it is possible for one module to
set config variables of another in a more loosely-coupled way.
|
|
|
|
Doom 3: BFG Edition installs copies of the GUS instrument files
(patches) that can be used for the GUS pseudo-emulation. Detect these
on startup if no GUS patch path has been configured and configure
gus_patch_path config variable automatically.
This fixes #333.
|