Age | Commit message (Collapse) | Author |
|
The XDG Base Directory Specification defines standard directories
that are searched for data files via the XDG_DATA_HOME and
XDG_DATA_DIRS environment variables:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
To make Chocolate Doom a good citizen, use these directories to
determine some of the locations in which to look for IWAD files. This
includes /usr/share/games/doom, which is absorbed under the default
value of the XDG_DATA_DIRS variable. We also now support the alternative
~/.local/share/games/doom as a user-writeable path in the user's home
directory that doesn't require root privileges.
This is part of #597 (thanks to @chungy for the suggestion).
|
|
The config file API previously relied on binding config variables
using M_BindVariable() which took a void pointer. It occurred to me
that if used on a boolean variable, this would be erroneous, but the
void pointer would make it impossible to tell. Split this into
separate M_Bind{Foo}Variable() functions based on type, which allows
for proper type checking on the pointers that are passed.
Vaguely related to #509.
|
|
|
|
strdup() can theoretically fail and return NULL. This could lead to
a crash or undesirable behavior. Add M_StringDuplicate() which does
the same thing but exits with an error if a string cannot be
allocated.
This fixes #456. Thanks to Quasar for the suggestion.
|
|
This change rewrites and simplifies the copyright headers at the top
of all source files:
* Remove "Emacs style mode select" line; this line was included in
the headers for the originally released source files and appears
to be to set the file type for old versions of Emacs. I'm not sure
entirely why it was required but I don't think it is any more.
* Remove "You should have received a copy of..." text from copyright
header. This refers to the old 59 Temple Place address where the
FSF headquarters used to be located and is no longer correct.
Rather than change to the new address, just remove the paragraph
as it is superfluous anyway. This fixes #311.
* Remove ---- separator lines so that the file headers are barer
and more simplified.
|
|
Having multiple binaries can cause some confusion - some users try to
run chocolate-doom with hexen.wad, thinking it is supported. Add a
startup check that makes sure the user is not trying to start the game
using the wrong IWAD file for the binary being run.
This fixes #382.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
Freedoom has new IWAD names. Support these as fallbacks if no other
IWAD file can be found, but prefer FreeDM as it has Vanilla-
compatible levels. Show a warning on startup if running using the
main Freedoom IWADs.
|
|
Subversion-branch: /branches/v2-branch
Subversion-revision: 2745
|
|
detection code (thanks chungy).
Subversion-branch: /branches/v2-branch
Subversion-revision: 2741
|
|
detection (thanks Dragonsbrethren).
Subversion-branch: /branches/v2-branch
Subversion-revision: 2711
|
|
from Odamex r4128 (thanks AlexMax).
Subversion-branch: /branches/v2-branch
Subversion-revision: 2618
|
|
What support exists is for obsolete devices I no longer possess; I've
never been contacted about the port and it's been several years since
I even bothered to build a new version. All the extra overrides are
clutter that can just be removed.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2615
|
|
Subversion-branch: /branches/v2-branch
Subversion-revision: 2546
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2540
|
|
Subversion-branch: /branches/v2-branch
Subversion-revision: 2537
|
|
information).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2529
|
|
Subversion-branch: /branches/v2-branch
Subversion-revision: 2393
|
|
IWADs.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2390
|
|
that we don't have the IWAD for.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2389
|
|
Subversion-branch: /branches/strife-branch
Subversion-revision: 2367
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 2366
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 2365
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 2360
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2359
|
|
temporarily until the netgame changes on raven-branch are finished.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2259
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 2258
|
|
also checks that extra options were provided on the command line (thanks
Sander van Dijk).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2223
|
|
several days ago.
Subversion-branch: /branches/raven-branch
Subversion-revision: 2212
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2176
|
|
problems with playing of voice sounds - especially had to add a dynamic
hashtable of voice sfxinfo_t's because Choco won't tolerate overwriting
them once they've been used (see channel_playing array in i_sdlsound.c)
- PROBLEM: Random Z_Malloc failures when trying to play sounds. Cannot
catch in debugger so far.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2065
|
|
Subversion-branch: /branches/strife-branch
Subversion-revision: 1849
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 1845
|
|
Subversion-branch: /branches/strife-branch
Subversion-revision: 1825
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1767
|
|
as well as directories in which to search for IWAD files.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1766
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 1737
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1699
|
|
Subversion-branch: /branches/strife-branch
Subversion-revision: 1623
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 1579
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1565
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1552
|
|
than the -findiwads command line hack.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1516
|
|
not exist.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1426
|