diff options
Diffstat (limited to 'src/heretic')
-rw-r--r-- | src/heretic/ct_chat.h | 8 | ||||
-rw-r--r-- | src/heretic/d_main.c | 33 | ||||
-rw-r--r-- | src/heretic/g_game.c | 16 |
3 files changed, 42 insertions, 15 deletions
diff --git a/src/heretic/ct_chat.h b/src/heretic/ct_chat.h index 326f65cb..eee7e6ce 100644 --- a/src/heretic/ct_chat.h +++ b/src/heretic/ct_chat.h @@ -24,6 +24,9 @@ // Chat mode stuff // +#ifndef HERETIC_CT_CHAT_H +#define HERETIC_CT_CHAT_H + #define CT_PLR_GREEN 1 #define CT_PLR_YELLOW 2 #define CT_PLR_RED 3 @@ -35,3 +38,8 @@ #define CT_KEY_RED 'r' #define CT_KEY_BLUE 'b' #define CT_KEY_ALL 't' + +extern char *chat_macros[10]; + +#endif /* #ifndef HERETIC_CT_CHAT_H */ + 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 diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index 59be2f87..83279a2e 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -29,6 +29,7 @@ #include "doomkeys.h" #include "i_timer.h" #include "i_system.h" +#include "m_controls.h" #include "m_misc.h" #include "m_random.h" #include "p_local.h" @@ -134,21 +135,6 @@ byte *savebuffer, *save_p; // // controls (have defaults) // -int key_right, key_left, key_up, key_down; -int key_strafeleft, key_straferight; -int key_fire, key_use, key_strafe, key_speed; -int key_flyup, key_flydown, key_flycenter; -int key_lookup, key_lookdown, key_lookcenter; -int key_invleft, key_invright, key_useartifact; - -int mousebfire; -int mousebstrafe; -int mousebforward; - -int joybfire; -int joybstrafe; -int joybuse; -int joybspeed; |