diff options
-rw-r--r-- | src/m_config.c | 90 | ||||
-rw-r--r-- | src/m_controls.c | 54 | ||||
-rw-r--r-- | src/m_controls.h | 1 | ||||
-rw-r--r-- | src/strife/d_main.c | 1 |
4 files changed, 139 insertions, 7 deletions
diff --git a/src/m_config.c b/src/m_config.c index 46ae4150..f3e6e913 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -186,6 +186,12 @@ static default_t doom_defaults_list[] = CONFIG_VARIABLE_KEY(key_straferight), //! + // Keyboard key to use health. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_useHealth), + + //! // Keyboard key to jump. // @@ -228,6 +234,42 @@ static default_t doom_defaults_list[] = CONFIG_VARIABLE_KEY(key_lookcenter), //! + // Keyboard key to query inventory. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invquery), + + //! + // Keyboard key to display mission objective. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_mission), + + //! + // Keyboard key to display inventory popup. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invPop), + + //! + // Keyboard key to display keys popup. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invKey), + + //! + // Keyboard key to jump to start of inventory. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invHome), + + //! + // Keyboard key to jump to end of inventory. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invEnd), + + //! // Keyboard key to scroll left in the inventory. // @@ -240,12 +282,48 @@ static default_t doom_defaults_list[] = CONFIG_VARIABLE_KEY(key_invright), //! + // Keyboard key to scroll left in the inventory. (Strife) + // + + CONFIG_VARIABLE_KEY(key_invLeft), + + //! + // Keyboard key to scroll right in the inventory. (Strife) + // + + CONFIG_VARIABLE_KEY(key_invRight), + + //! // Keyboard key to use the current item in the inventory. // CONFIG_VARIABLE_KEY(key_useartifact), //! + // Keyboard key to use inventory item. (Strife) + // + + CONFIG_VARIABLE_KEY(key_invUse), + + //! + // Keyboard key to drop an inventory item. (Strife only) + // + + CONFIG_VARIABLE_KEY(key_invDrop), + + //! + // Keyboard key to look up. (Strife) + // + + CONFIG_VARIABLE_KEY(key_lookUp), + + //! + // Keyboard key to look down. (Strife) + // + + CONFIG_VARIABLE_KEY(key_lookDown), + + //! // Keyboard key to fire the currently selected weapon. // @@ -425,6 +503,12 @@ static default_t doom_defaults_list[] = CONFIG_VARIABLE_INT(messageson), + //! + // Name of background flat used by view border. (Strife only) + // + + CONFIG_VARIABLE_STRING(back_flat), + //! // Multiplayer chat macro: message to send when alt+0 is pressed. @@ -485,12 +569,6 @@ static default_t doom_defaults_list[] = // CONFIG_VARIABLE_STRING(chatmacro9), - - //! - // Name of background flat used by view border. Strife only. - // - - CONFIG_VARIABLE_STRING(back_flat), }; static default_collection_t doom_defaults = diff --git a/src/m_controls.c b/src/m_controls.c index 98b1e51b..0f64249d 100644 --- a/src/m_controls.c +++ b/src/m_controls.c @@ -66,6 +66,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 // @@ -94,7 +114,7 @@ int key_weapon6 = '6'; int key_weapon7 = '7'; int key_weapon8 = '8'; -// Map cotnrols keys: +// Map controls keys: int key_map_north = KEY_UPARROW; int key_map_south = KEY_DOWNARROW; @@ -216,6 +236,38 @@ void M_BindHexenControls(void) M_BindVariable("joyb_jump", &joybjump); } +void M_BindStrifeControls(void) +{ + // 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); diff --git a/src/m_controls.h b/src/m_controls.h index 2a4aa3df..c284fa84 100644 --- a/src/m_controls.h +++ b/src/m_controls.h @@ -140,6 +140,7 @@ extern int dclick_use; void M_BindBaseControls(void); void M_BindHereticControls(void); void M_BindHexenControls(void); +void M_BindStrifeControls(void); void M_BindWeaponControls(void); void M_BindMapControls(void); void M_BindMenuControls(void); diff --git a/src/strife/d_main.c b/src/strife/d_main.c index a2799cae..a203ef3d 100644 --- a/src/strife/d_main.c +++ b/src/strife/d_main.c @@ -383,6 +383,7 @@ void D_BindVariables(void) M_BindWeaponControls(); M_BindMapControls(); M_BindMenuControls(); + M_BindStrifeControls(); // haleyjd 09/01/10: [STRIFE] #ifdef FEATURE_MULTIPLAYER NET_BindVariables(); |