diff options
Diffstat (limited to 'src/m_controls.c')
-rw-r--r-- | src/m_controls.c | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/src/m_controls.c b/src/m_controls.c index 60a96ac2..409f26bf 100644 --- a/src/m_controls.c +++ b/src/m_controls.c @@ -68,6 +68,26 @@ int key_useartifact = KEY_ENTER; int key_jump = '/'; // +// Strife key controls +// +// haleyjd 09/01/10 +// + +// Note: Strife also uses key_invleft, key_invright, key_jump, key_lookup, and +// key_lookdown, but with different default values. + +int key_usehealth = 'h'; +int key_invquery = 'q'; +int key_mission = 'w'; +int key_invpop = 'z'; +int key_invkey = 'k'; +int key_invhome = KEY_HOME; +int key_invend = KEY_END; +int key_invuse = KEY_ENTER; +int key_invdrop = KEY_BACKSPACE; + + +// // Mouse controls // @@ -234,6 +254,41 @@ void M_BindHexenControls(void) M_BindVariable("joyb_jump", &joybjump); } +void M_BindStrifeControls(void) +{ + // These are shared with all games, but have different defaults: + key_message_refresh = '/'; + + // These keys are shared with Heretic/Hexen but have different defaults: + key_jump = 'a'; + key_lookup = KEY_PGUP; + key_lookdown = KEY_PGDN; + key_invleft = KEY_INS; + key_invright = KEY_DEL; + + M_BindVariable("key_jump", &key_jump); + M_BindVariable("key_lookUp", &key_lookup); + M_BindVariable("key_lookDown", &key_lookdown); + M_BindVariable("key_invLeft", &key_invleft); + M_BindVariable("key_invRight", &key_invright); + + // Custom Strife-only Keys: + M_BindVariable("key_useHealth", &key_usehealth); + M_BindVariable("key_invquery", &key_invquery); + M_BindVariable("key_mission", &key_mission); + M_BindVariable("key_invPop", &key_invpop); + M_BindVariable("key_invKey", &key_invkey); + M_BindVariable("key_invHome", &key_invhome); + M_BindVariable("key_invEnd", &key_invend); + M_BindVariable("key_invUse", &key_invuse); + M_BindVariable("key_invDrop", &key_invdrop); + + // Strife also supports jump on mouse and joystick, and in the exact same + // manner as Hexen! + M_BindVariable("mouseb_jump", &mousebjump); + M_BindVariable("joyb_jump", &joybjump); +} + void M_BindWeaponControls(void) { M_BindVariable("key_weapon1", &key_weapon1); @@ -303,8 +358,8 @@ void M_BindMenuControls(void) void M_BindChatControls(unsigned int num_players) { - char name[20]; - int i; + char name[32]; // haleyjd: 20 not large enough - Thank you, come again! + unsigned int i; // haleyjd: signedness conflict M_BindVariable("key_multi_msg", &key_multi_msg); |