diff options
author | Simon Howard | 2008-09-23 17:54:13 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-23 17:54:13 +0000 |
commit | 350fe185784d6d0350ed8b675630440ff425a6ca (patch) | |
tree | 2d5f3415d193bd72e72a0b0a435a6204f6be8477 /src/heretic/d_main.c | |
parent | 69b0c4526e6f2d6fe6920f1efa3b32e27b3db0bc (diff) | |
download | chocolate-doom-350fe185784d6d0350ed8b675630440ff425a6ca.tar.gz chocolate-doom-350fe185784d6d0350ed8b675630440ff425a6ca.tar.bz2 chocolate-doom-350fe185784d6d0350ed8b675630440ff425a6ca.zip |
Add heretic key controls to config file list. Add key binding code to
heretic/d_main.c and change g_game.c to use the common definitions.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1265
Diffstat (limited to 'src/heretic/d_main.c')
-rw-r--r-- | src/heretic/d_main.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 6107ba16..6797ace1 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -26,9 +26,13 @@ #include <stdio.h> #include <stdlib.h> +#include "ct_chat.h" #include "doomdef.h" +#include "i_system.h" #include "i_video.h" #include "m_argv.h" +#include "m_config.h" +#include "m_controls.h" #include "p_local.h" #include "s_sound.h" #include "v_video.h" @@ -702,6 +706,35 @@ void CleanExit(void) } #endif +// +// Add configuration file variable bindings. +// + +void D_BindVariables(void) +{ + extern int screenblocks; + extern int snd_Channels; + int i; + + I_BindVariables(); + M_BindBaseControls(); + M_BindHereticControls(); + + M_BindVariable("mouse_sensitivity", &mouseSensitivity); + M_BindVariable("sfx_volume", &snd_MaxVolume); + M_BindVariable("music_volume", &snd_MusicVolume); + M_BindVariable("screenblocks", &screenblocks); + M_BindVariable("snd_channels", &snd_Channels); + + for (i=0; i<10; ++i) + { + char buf[12]; + + sprintf(buf, "chatmacro%i", i); + M_BindVariable(buf, &chat_macros[i]); + } +} + //--------------------------------------------------------------------------- // // PROC D_DoomMain |