diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index e0b4d9fd5..6a21564c9 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -182,16 +182,6 @@ void ctrlGetInput(void) gInputMode = kInputMessage; } - if (buttonMap.ButtonDown(gamefunc_AutoRun)) - { - buttonMap.ClearButton(gamefunc_AutoRun); - gAutoRun = !gAutoRun; - if (gAutoRun) - viewSetMessage("Auto run ON"); - else - viewSetMessage("Auto run OFF"); - } - if (buttonMap.ButtonDown(gamefunc_Map_Toggle)) { buttonMap.ClearButton(gamefunc_Map_Toggle); diff --git a/source/common/console/c_buttons.cpp b/source/common/console/c_buttons.cpp index bbfdab768..0e9939561 100644 --- a/source/common/console/c_buttons.cpp +++ b/source/common/console/c_buttons.cpp @@ -61,12 +61,12 @@ static const ButtonDesc gamefuncs[] = { { gamefunc_Crouch, "Crouch"}, { gamefunc_Look_Up, "Look_Up"}, { gamefunc_Look_Down, "Look_Down"}, - { gamefunc_Look_Left, "Look_Left"}, - { gamefunc_Look_Right, "Look_Right"}, + { gamefunc_Look_Left, "Look_Left"}, + { gamefunc_Look_Right, "Look_Right"}, { gamefunc_Strafe_Left, "Strafe_Left"}, { gamefunc_Strafe_Right, "Strafe_Right"}, - { gamefunc_Aim_Up, "Aim_Up"}, - { gamefunc_Aim_Down, "Aim_Down"}, + { gamefunc_Aim_Up, "Aim_Up"}, + { gamefunc_Aim_Down, "Aim_Down"}, { gamefunc_Weapon_1, "Weapon_1"}, { gamefunc_Weapon_2, "Weapon_2"}, { gamefunc_Weapon_3, "Weapon_3"}, @@ -87,8 +87,8 @@ static const ButtonDesc gamefuncs[] = { { gamefunc_TurnAround, "Turn_Around"}, { gamefunc_SendMessage, "Send_Message"}, { gamefunc_Map, "Map"}, - { gamefunc_Shrink_Screen, "Shrink_Screen"}, - { gamefunc_Enlarge_Screen, "Enlarge_Screen"}, + { gamefunc_Shrink_Screen, "Shrink_Screen"}, + { gamefunc_Enlarge_Screen, "Enlarge_Screen"}, { gamefunc_Center_View, "Center_View"}, { gamefunc_Holster_Weapon, "Holster_Weapon"}, { gamefunc_Show_Opponents_Weapon, "Show_Opponents_Weapon"}, @@ -103,7 +103,6 @@ static const ButtonDesc gamefuncs[] = { { gamefunc_Show_DukeMatch_Scores, "Show_DukeMatch_Scores"}, { gamefunc_Dpad_Select, "Dpad_Select"}, { gamefunc_Dpad_Aiming, "Dpad_Aiming"}, - { gamefunc_AutoRun, "AutoRun"}, { gamefunc_Last_Weapon, "Last_Used_Weapon"}, { gamefunc_Alt_Weapon, "Alt_Weapon"}, { gamefunc_Third_Person_View, "Third_Person_View"}, diff --git a/source/common/console/c_buttons.h b/source/common/console/c_buttons.h index 7b14bca89..4f53282f9 100644 --- a/source/common/console/c_buttons.h +++ b/source/common/console/c_buttons.h @@ -70,7 +70,6 @@ enum GameFunction_t gamefunc_Show_DukeMatch_Scores, gamefunc_Dpad_Select, gamefunc_Dpad_Aiming, - gamefunc_AutoRun, gamefunc_Last_Weapon, gamefunc_Alt_Weapon, gamefunc_Third_Person_View, diff --git a/source/common/console/c_con.cpp b/source/common/console/c_con.cpp index d8ff9d529..df40bde31 100644 --- a/source/common/console/c_con.cpp +++ b/source/common/console/c_con.cpp @@ -31,7 +31,7 @@ ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **--------------------------------------------------------------------------- ** -*/ +*/ #include #include "basics.h" @@ -113,7 +113,7 @@ static GameFuncDesc con_gamefuncs[] = { {"+Show_DukeMatch_Scores", "Show_Scoreboard"}, {"+Dpad_Select", "Dpad_Select"}, {"+Dpad_Aiming", "Dpad_Aiming"}, -{"+AutoRun", "AutoRun"}, +{"toggle cl_autorun", "AutoRun"}, {"+Last_Used_Weapon", "Last_Used_Weapon"}, {"QuickSave", "Quick_Save"}, {"QuickLoad", "Quick_Load"}, @@ -274,4 +274,3 @@ const char *C_CON_GetButtonFunc(int num) } return ""; } - diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 5ddba222f..ed460409d 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -60,7 +60,23 @@ CVARD(Bool, cl_crosshair, true, CVAR_ARCHIVE, "enable/disable crosshair"); CVARD(Bool, cl_automsg, false, CVAR_ARCHIVE, "enable/disable automatically sending messages to all players") // Not implemented for Blood -CVARD(Bool, cl_autorun, true, CVAR_ARCHIVE, "enable/disable autorun") +CUSTOM_CVARD(Bool, cl_autorun, true, CVAR_ARCHIVE, "enable/disable autorun") +{ +#if 0 // todo: print a message + + if (gAutoRun) + viewSetMessage("Auto run ON"); + else + viewSetMessage("Auto run OFF"); + + + RUN MODE OFF + RUN MODE ON + cl_autorun= 1-cl_autorun; + P_DoQuote(QUOTE_RUN_MODE_OFF + cl_autorun, &myplayer); + } +#endif +} CVARD(Bool, cl_runmode, true, CVAR_ARCHIVE, "enable/disable modernized run key operation") CVARD(Bool, cl_autosave, true, CVAR_ARCHIVE, "enable/disable autosaves") // Not implemented for Blood (but looks like the other games never check it either.) CVARD(Bool, cl_autosavedeletion, true, CVAR_ARCHIVE, "enable/disable automatic deletion of autosaves") // Not implemented for Blood diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index dca063bd6..f5737af6e 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -4725,13 +4725,6 @@ void G_HandleLocalKeys(void) G_UpdateScreenArea(); } - if (buttonMap.ButtonDown(gamefunc_AutoRun)) - { - buttonMap.ClearButton(gamefunc_AutoRun); - cl_autorun= 1-cl_autorun; - P_DoQuote(QUOTE_RUN_MODE_OFF + cl_autorun, &myplayer); - } - if (buttonMap.ButtonDown(gamefunc_Map)) { buttonMap.ClearButton(gamefunc_Map); diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index c414339cb..949f66748 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -6271,13 +6271,6 @@ void G_HandleLocalKeys(void) G_UpdateScreenArea(); } - if (buttonMap.ButtonDown(gamefunc_AutoRun)) - { - buttonMap.ClearButton(gamefunc_AutoRun); - cl_autorun = !cl_autorun; - P_DoQuote(QUOTE_RUN_MODE_OFF+cl_autorun,g_player[myconnectindex].ps); - } - if (buttonMap.ButtonDown(gamefunc_Map)) { buttonMap.ClearButton(gamefunc_Map); diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index 38eed52f1..5a39cc2a3 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -702,8 +702,15 @@ OptionMenu "ActionControlsMenu"// protected StaticText "" Control "$CNTRLMNU_MOUSELOOK" , "+mouse_aiming" + Control "$CNTRLMNU_AIMUP" , "+aim_up" + Control "$CNTRLMNU_AIMDOWN" , "+aim_down" Control "$CNTRLMNU_LOOKUP" , "+look_up" Control "$CNTRLMNU_LOOKDOWN" , "+look_down" + ifgame(Duke, Nam, WW2GI, Fury, Redneck, RedneckRides) + { + Control "$CNTRLMNU_LOOKLEFT" , "+look_left" + Control "$CNTRLMNU_LOOKRIGHT" , "+look_right" + } Control "$CNTRLMNU_CENTERVIEW" , "+center_view" StaticText "" @@ -871,11 +878,11 @@ OptionMenu "OtherControlsMenu"// protected Control "$CNTRLMNU_ADJUST_GAMMA" , "bumpgamma" StaticText "" - Control "$CNTRLMNU_OPEN_HELP" , "menu_help" - Control "$CNTRLMNU_OPEN_SAVE" , "menu_save" - Control "$CNTRLMNU_OPEN_LOAD" , "menu_load" - Control "$CNTRLMNU_OPEN_OPTIONS" , "menu_options" - Control "$CNTRLMNU_OPEN_DISPLAY" , "menu_display" + Control "$CNTRLMNU_OPEN_HELP" , "openhelpmenu" + Control "$CNTRLMNU_OPEN_SAVE" , "opensavemenu" + Control "$CNTRLMNU_OPEN_LOAD" , "openloadmenu" + Control "$CNTRLMNU_OPEN_OPTIONS" , "openmenu optionsmenu" + Control "$CNTRLMNU_OPEN_DISPLAY" , "openmenu displayoptions" Control "$CNTRLMNU_EXIT_TO_MAIN" , "menu_endgame" Control "$CNTRLMNU_MENU_QUIT" , "menu_quit" @@ -884,3 +891,111 @@ OptionMenu "OtherControlsMenu"// protected Control "$CNTRLMNU_QUICKLOAD" , "quickload" } +//------------------------------------------------------------------------------------------- +// +// Mouse Menu +// +//------------------------------------------------------------------------------------------- + +OptionValue "Corners" +{ + -1, "$OPTVAL_OFF" + 0, "$OPTVAL_UPPERLEFT" + 1, "$OPTVAL_UPPERRIGHT" + 2, "$OPTVAL_LOWERLEFT" + 3, "$OPTVAL_LOWERRIGHT" +} + +OptionValue "MenuMouse" +{ + 0, "$TXT_NO" + 1, "$TXT_YES" + 2, "$OPTVAL_TOUCHSCREENLIKE" +} + +OptionString "Cursors" +{ + "None", "$OPTVAL_DEFAULT" + "cursor", "$OPTSTR_SIMPLEARROW" + "-", "$OPTSTR_SYSTEMCURSOR" +} + +OptionMenu "MouseOptions" protected +{ + Title "$MOUSEMNU_TITLE" + Option "$MOUSEMNU_ENABLEMOUSE", "in_mouse", "YesNo" + Option "$MOUSEMNU_MOUSEINMENU", "m_use_mouse", "MenuMouse", "use_mouse" + Option "$MOUSEMNU_SHOWBACKBUTTON", "m_show_backbutton", "Corners", "use_mouse" + // todo Option "$MOUSEMNU_CURSOR", "vid_cursor", "Cursors" + StaticText "" + Slider "$MOUSEMNU_SENSITIVITY", "mouse_sensitivity", 0.5, 2.5, 0.1 + Option "$MOUSEMNU_NOPRESCALE", "m_noprescale", "NoYes" + Option "$MOUSEMNU_SMOOTHMOUSE", "m_filter", "YesNo" + StaticText "" + Slider "$MOUSEMNU_TURNSPEED", "m_yaw", 0, 2.5, 0.1 + Slider "$MOUSEMNU_MOUSELOOKSPEED", "m_pitch", 0, 2.5, 0.1 + Slider "$MOUSEMNU_FORWBACKSPEED", "m_forward", 0, 2.5, 0.1 + Slider "$MOUSEMNU_STRAFESPEED", "m_side", 0, 2.5, 0.1 + StaticText "" + Option "$MOUSEMNU_ALWAYSMOUSELOOK", "in_mousemode", "OnOff" + Option "$MOUSEMNU_INVERTMOUSE", "in_mouseflip", "OnOff" + Option "$MOUSEMNU_LOOKSPRING", "in_aimmode", "OnOff" // Functionm exists but is very broken. Definitely needs fixing. + // Do we need this? Option "$MOUSEMNU_LOOKSTRAFE", "lookstrafe", "OnOff" +} + +//------------------------------------------------------------------------------------------- +// +// Joystick Menu +// +//------------------------------------------------------------------------------------------- + +OptionMenu "JoystickOptionsDefaults" protected +{ + Title "$JOYMNU_OPTIONS" + Option "$JOYMNU_ENABLE", "use_joystick", "YesNo" + Option "$JOYMNU_NOMENU", "m_blockcontrollers", "YesNo" + /*IfOption(Windows) + { + Option "$JOYMNU_DINPUT", "joy_dinput", "YesNo" + Option "$JOYMNU_XINPUT", "joy_xinput", "YesNo" + Option "$JOYMNU_PS2", "joy_ps2raw", "YesNo" + }*/ + StaticText "" + StaticTextSwitchable "$JOYMNU_NOCON", "$JOYMNU_CONFIG", "ConfigureMessage" + StaticTextSwitchable " ", "$JOYMNU_DISABLED1", "ConnectMessage1" + StaticTextSwitchable " ", "$JOYMNU_DISABLED2", "ConnectMessage2" + + // The rest will be filled in by joystick code if devices get connected or disconnected +} + +OptionMenu "JoystickOptions" protected +{ + Title "$JOYMNU_OPTIONS" +} + +OptionValue "JoyAxisMapNames" +{ + -1, "$OPTVAL_NONE" + 0, "$OPTVAL_TURNING" + 1, "$OPTVAL_LOOKINGUPDOWN" + 2, "$OPTVAL_MOVINGFORWARD" + 3, "$OPTVAL_STRAFING" + 4, "$OPTVAL_MOVINGUPDOWN" +} + +OptionValue "Inversion" +{ + 0, "$OPTVAL_NOTINVERTED" + 1, "$OPTVAL_INVERTED" +} + +OptionMenu "JoystickConfigMenu" protected +{ + Title "$JOYMNU_TITLE" + Class "JoystickConfigMenu" + // Will be filled in by joystick code. +} + + + +