summaryrefslogtreecommitdiff
path: root/src/m_config.c
AgeCommit message (Collapse)Author
2015-02-20Refactor config file API.Simon Howard
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.
2014-10-24Replace strdup() with M_StringDuplicate().Simon Howard
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.
2014-05-05Clean up file headers.Simon Howard
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.
2014-05-01config: Clarify config file documentation.Simon Howard
Re-word some of the documentation for the joystick button config variables, to avoid confusion between physical/virtual joystick buttons.
2014-04-30joystick: Add virtual-physical button mapping.Simon Howard
The solution to solving #386 is to add a layer of indirection: the game code can only support up to ~20 joystick buttons, but this doesn't matter as long as we never want to bind more than 20 buttons to actions anyway. Redefine the game's notion of buttons to be based on "virtual" joystick buttons, and map these buttons to physical (SDL) buttons based on configuration file variables.
2014-04-19joystick: Add joystick button to toggle menu.Simon Howard
When using a joystick or gamepad it's nice to be able to bring up the menu without having to reach for the keyboard. This makes modern gamepads more useful/usable.
2014-04-19joystick: Add an axis to allow strafing.Simon Howard
Modern gamepads typically have 2-3 D-pads and joysticks. This means that it's desirable to be able to use one joystick for turning and another for strafing. Add another axis in addition to the current X and y axes that performs strafe movement.
2014-04-12video: Change default for screen_bpp to 0.Simon Howard
Some machines don't work well with 8-bit screen depths any more. It's better to default to just using the machine's native color depth instead. Change the default to 0 (for SDL_SetVideoMode this means "use native color depth"), auto-adjust to native color depth on startup if screen_bpp=0 (so that debug messages at least make sense) and document for the config file value that a value of zero means "use native".
2014-03-30Eliminate some uses of sprintf() from common code.Simon Howard
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.
2014-03-27Define a keyboard scan code for PrintScreen.Simon Howard
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.
2014-03-25config: Add API to get/set config variables.Simon Howard
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.
2014-03-23music: Add config var for external music program.Simon Howard
Mix_SetMusicCMD() allows a program to be specified to configure an external program to be invoked for music playback. Add a config variable (snd_musiccmd) to allow this to be set from a configuration file. Thanks to Holering for his comments on Doomworld about how to do this.
2014-03-23sound: Add config variable to control buffer size.Simon Howard
Add snd_maxslicetime_ms variable to control the size of the output sound buffer, and reduce the default from 70ms to 28ms to match Doom's 35fps timer. Thanks to Holering for reporting this (fixes #345).
2014-03-18Add a dedicated key for taking screenshots.Fabian Greffrath
2014-03-17Add PNG screenshots to advanced video options menu.Fabian Greffrath
2014-03-17Allow for PNG screenshots.Fabian Greffrath
2014-03-13Allow to rebind artifact keys in Hexen.Fabian Greffrath
2013-09-29Add config file variable for controlling libsamplerate conversion scaleSimon Howard
factor. This is an alternative to the approach taken in the version on the trunk version, where all sounds are pre-converted at startup and adjusted based on the maximum value. Subversion-branch: /branches/v2-branch Subversion-revision: 2690
2013-08-10Fix Strife documentation comments. Remove -episode which does not existSimon Howard
in Vanilla Strife. Subversion-branch: /branches/v2-branch Subversion-revision: 2613
2013-03-24Initial docgen changes to generate manpages for Heretic, Hexen, Strife.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2568
2013-03-03Add GUS pseudo-emulation.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2566
2013-03-03Add configuration file variable to specify path to a Timidity configSimon Howard
file. Subversion-branch: /branches/v2-branch Subversion-revision: 2564
2012-02-14Don't print bogus message about config dir when there's nothing to say.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2505
2011-10-23Remove hack that forces the window to always be centered within theSimon Howard
screen. Add a configuration file variable to control where the game window should appear. Subversion-branch: /branches/v2-branch Subversion-revision: 2467
2011-09-11Merge from raven-branch.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2367
2011-09-05Refactor savegamedir calculation code to work the same as trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2360
2011-03-06Fix up config file variables to match Vanilla.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2295
2011-03-05Add configuration parameter to limit the amount of memory used forSimon Howard
cached soundss. Subversion-branch: /branches/strife-branch Subversion-revision: 2290
2011-02-20Removed ability to disable messages, and replaced with configurationJames Haley
variable to control dialogue text messages, as in vanilla. Also, absence of voices.wad, or use of the -novoices parameter, will now properly both disable voices AND enable dialogue text. Subversion-branch: /branches/strife-branch Subversion-revision: 2268
2011-02-12Merge from raven-branch. FEATURE_MULTIPLAYER has been disabledSimon Howard
temporarily until the netgame changes on raven-branch are finished. Subversion-branch: /branches/strife-branch Subversion-revision: 2259
2011-02-12Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2258
2011-01-13In configuration files, use the scan code for right shift, not leftSimon Howard
shift, to match Vanilla (thanks AlexXav). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2238
2010-12-18Add a M_CheckParmWithArgs function, that behaves like M_CheckParm butSimon Howard
also checks that extra options were provided on the command line (thanks Sander van Dijk). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2223
2010-12-10Merge from trunk. This is slightly out of date as I did the mergeSimon Howard
several days ago. Subversion-branch: /branches/raven-branch Subversion-revision: 2212
2010-11-24Detect when running on Windows Vista or later, and switch to 32 bppSimon Howard
screen mode. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2167
2010-11-24Add configuration file parameter and command line option to specify theSimon Howard
screen pixel depth. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2166
2010-10-03Added beginnings of Strife hub save code. ATTN fraggle: please addJames Haley
m_saves.c to other platform builds. See also email regarding opendir etc. Subversion-branch: /branches/strife-branch Subversion-revision: 2151
2010-09-11Fix docgen error with key_multi_msgplayer8 config file variable.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2064
2010-09-09Merge from raven-branch.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2051
2010-09-02Added Strife keys to configuration. Note that this *depends* on theJames Haley
current behavior of Choco Doom in treating configuration variable strings as case-sensitive, because these are the real values used by Rogue in their config, and they differ from some Heretic/Hexen config strings only by case. Subversion-branch: /branches/strife-branch Subversion-revision: 2000
2010-08-31Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1987
2010-08-29Added voice volume and back flat configuration variables. Made statusJames Haley
bar redraw when menus are active as in Strife. Finished up the Strife "settings" menu which was only for sound volumes in vanilla Doom. Subversion-branch: /branches/strife-branch Subversion-revision: 1973
2010-08-09Add weapon cycling bindings for mouse and joystick buttons. Add weaponSimon Howard
cycling bindings to configuration file and setup tool. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1953
2010-07-31Add multiplayer spy key binding.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1948
2010-07-28Add config file parameter to set OPL I/O port.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1947
2010-07-10Add key bindings for multiplayer messaging.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1940
2010-07-10Add key binding to change demo recording quit key.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1939
2009-11-21Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1737
2009-11-21Don't crash if key settings are set in a configuration file that are outSimon Howard
of range (thanks entryway). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1732
2009-11-19Rework the OS X MIDI disabling code, as SDL_mixer 1.2.11 fixes theSimon Howard
crash. Check and disable MIDI by default if using an older version of SDL on OS X. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1730