summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorSimon Howard2007-03-16 21:43:28 +0000
committerSimon Howard2007-03-16 21:43:28 +0000
commit1658ae111ec89bc32d63dcb12848337a968a0400 (patch)
tree6918e6b44f12c7e9c6b7f455ce95014f91d712eb /setup
parentb8e861b27e87b35cecc3a057511f65419184cc4d (diff)
downloadchocolate-doom-1658ae111ec89bc32d63dcb12848337a968a0400.tar.gz
chocolate-doom-1658ae111ec89bc32d63dcb12848337a968a0400.tar.bz2
chocolate-doom-1658ae111ec89bc32d63dcb12848337a968a0400.zip
Add config file option to enable/disable native keyboard bindings.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 860
Diffstat (limited to 'setup')
-rw-r--r--setup/configfile.c3
-rw-r--r--setup/keyboard.c8
-rw-r--r--setup/keyboard.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/setup/configfile.c b/setup/configfile.c
index f2ec8d3d..3b2326d5 100644
--- a/setup/configfile.c
+++ b/setup/configfile.c
@@ -188,7 +188,7 @@ typedef struct
char *filename;
} default_collection_t;
-static default_t doom_defaults_list[] =
+static default_t doom_defaults_list[] =
{
{"mouse_sensitivity", &mouseSensitivity, DEFAULT_INT, 0, 0},
{"sfx_volume",&sfxVolume, DEFAULT_INT, 0, 0},
@@ -265,6 +265,7 @@ static default_t extra_defaults_list[] =
{"show_endoom", &show_endoom, DEFAULT_INT, 0, 0},
{"vanilla_savegame_limit", &vanilla_savegame_limit, DEFAULT_INT, 0, 0},
{"vanilla_demo_limit", &vanilla_demo_limit, DEFAULT_INT, 0, 0},
+ {"vanilla_keyboard_mapping", &vanilla_keyboard_mapping, DEFAULT_INT, 0, 0},
#ifdef FEATURE_MULTIPLAYER
{"player_name", &net_player_name, DEFAULT_STRING, 0, 0},
#endif
diff --git a/setup/keyboard.c b/setup/keyboard.c
index b804714f..c10b9ce4 100644
--- a/setup/keyboard.c
+++ b/setup/keyboard.c
@@ -37,6 +37,8 @@ int key_strafe = KEY_RALT;
int key_speed = KEY_RSHIFT;
int joybspeed = 3;
+int vanilla_keyboard_mapping = 1;
+
static int always_run = 0;
static int *allkeys[] = {&key_left, &key_right, &key_up, &key_down,
@@ -107,10 +109,14 @@ void ConfigKeyboard(void)
TXT_AddWidgets(window,
TXT_NewSeparator("Movement"),
movement_table = TXT_NewTable(2),
- run_control = TXT_NewCheckBox("Always run", &always_run),
TXT_NewSeparator("Action"),
action_table = TXT_NewTable(2),
+
+ TXT_NewSeparator("Misc."),
+ run_control = TXT_NewCheckBox("Always run", &always_run),
+ TXT_NewInvertedCheckBox("Use native keyboard mapping",
+ &vanilla_keyboard_mapping),
NULL);
TXT_SetColumnWidths(movement_table, 20, 8);
diff --git a/setup/keyboard.h b/setup/keyboard.h
index e4cb2139..6442e1e4 100644
--- a/setup/keyboard.h
+++ b/setup/keyboard.h
@@ -33,6 +33,7 @@ extern int key_use;
extern int key_strafe;
extern int key_speed;
extern int joybspeed;
+extern int vanilla_keyboard_mapping;
void ConfigKeyboard(void);