summaryrefslogtreecommitdiff
path: root/src/m_controls.c
diff options
context:
space:
mode:
authorSimon Howard2008-09-11 21:03:48 +0000
committerSimon Howard2008-09-11 21:03:48 +0000
commitb868352951acee0e556d702e5e90aa67d9a2b39e (patch)
treeb07b281ae6be155d2b80fdc09c2daa3c3132d238 /src/m_controls.c
parentd863f019a2d19f1146d92c4db71883ab2ead87ec (diff)
downloadchocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.tar.gz
chocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.tar.bz2
chocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.zip
Refactor configuration file system to allow configuration file variables
to be bound in a distributed fashion around the program. Remove dependency of m_config.c on doom/. Subversion-branch: /branches/raven-branch Subversion-revision: 1222
Diffstat (limited to 'src/m_controls.c')
-rw-r--r--src/m_controls.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/m_controls.c b/src/m_controls.c
index 56084a79..9b81d9c3 100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -23,6 +23,8 @@
#include "doomtype.h"
#include "doomkeys.h"
+
+#include "m_config.h"
//
// Keyboard controls
@@ -76,3 +78,41 @@ int dclick_use = 1;
int novert = 0;
+//
+// Bind all of the common controls used by Doom and all other games.
+//
+
+void M_BindBaseControls(void)
+{
+ M_BindVariable("key_right", &key_right),
+ M_BindVariable("key_left", &key_left),
+ M_BindVariable("key_up", &key_up),
+ M_BindVariable("key_down", &key_down),
+ M_BindVariable("key_strafeleft", &key_strafeleft),
+ M_BindVariable("key_straferight", &key_straferight),
+ M_BindVariable("key_fire", &key_fire),
+ M_BindVariable("key_use", &key_use),
+ M_BindVariable("key_strafe", &key_strafe),
+ M_BindVariable("key_speed", &key_speed),
+
+ M_BindVariable("mouseb_fire", &mousebfire),
+ M_BindVariable("mouseb_strafe", &mousebstrafe),
+ M_BindVariable("mouseb_forward", &mousebforward),
+
+ M_BindVariable("joyb_fire", &joybfire),
+ M_BindVariable("joyb_strafe", &joybstrafe),
+ M_BindVariable("joyb_use", &joybuse),
+ M_BindVariable("joyb_speed", &joybspeed),
+
+ // Extra controls that are not in the Vanilla versions:
+
+ M_BindVariable("joyb_strafeleft", &joybstrafeleft);
+ M_BindVariable("joyb_straferight", &joybstraferight);
+ M_BindVariable("mouseb_strafeleft", &mousebstrafeleft);
+ M_BindVariable("mouseb_straferight", &mousebstraferight);
+ M_BindVariable("mouseb_use", &mousebuse);
+ M_BindVariable("mouseb_backward", &mousebbackward);
+ M_BindVariable("dclick_use", &dclick_use);
+ M_BindVariable("novert", &novert);
+}
+