Skip to content

Commit

Permalink
Blood: Expose turn speed option for keyboard control menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir committed Sep 9, 2024
1 parent eeab9d5 commit 5e9fa37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/blood/src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,10 @@ CGameMenuItemChain itemOptionsControlJoystickButtons("JOYSTICK BUTTONS SETUP", 1
CGameMenuItemChain itemOptionsControlJoystickAxes("JOYSTICK AXES SETUP", 1, 0, 140, 320, 1, &menuOptionsControlJoystickListAxes, -1, SetupJoystickAxesMenu, 0);

CGameMenuItemTitle itemOptionsControlKeyboardTitle("KEYBOARD SETUP", 1, 160, 20, 2038);
CGameMenuItemChain itemOptionsControlKeyboardList("Configure Keys...", 1, 0, 60, 320, 1, &menuKeys, -1, NULL, 0);
CGameMenuItemChain itemOptionsControlKeyboardReset("Reset Keys (default)...", 1, 0, 80, 320, 1, &menuKeys, -1, ResetKeys, 0);
CGameMenuItemChain itemOptionsControlKeyboardResetClassic("Reset Keys (classic)...", 1, 0, 100, 320, 1, &menuKeys, -1, ResetKeysClassic, 0);
CGameMenuItemSlider itemOptionsControlKeyboardSliderTurnSpeed("Key Turn Speed:", 1, 18, 50, 280, &gTurnSpeed, 64, 128, 4, SetTurnSpeed, -1, -1);
CGameMenuItemChain itemOptionsControlKeyboardList("Configure Keys...", 1, 0, 110, 320, 1, &menuKeys, -1, NULL, 0);
CGameMenuItemChain itemOptionsControlKeyboardReset("Reset Keys (default)...", 1, 0, 135, 320, 1, &menuKeys, -1, ResetKeys, 0);
CGameMenuItemChain itemOptionsControlKeyboardResetClassic("Reset Keys (classic)...", 1, 0, 155, 320, 1, &menuKeys, -1, ResetKeysClassic, 0);

void SetMouseAimMode(CGameMenuItemZBool *pItem);
void SetMouseVerticalAim(CGameMenuItemZBool *pItem);
Expand Down Expand Up @@ -1434,11 +1435,13 @@ void SetupControlsMenu(void)
menuOptionsControl.Add(&itemBloodQAV, false);

menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardTitle, false);
menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardList, true);
menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardSliderTurnSpeed, true);
menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardList, false);
menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardReset, false);
menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardResetClassic, false);
menuOptionsControlKeyboard.Add(&itemBloodQAV, false);

itemOptionsControlKeyboardSliderTurnSpeed.nValue = gTurnSpeed;
menuOptionsControlMouse.Add(&itemOptionsControlMouseTitle, false);
menuOptionsControlMouse.Add(&itemOptionsControlMouseButton, true);
menuOptionsControlMouse.Add(&itemOptionsControlMouseSensitivity, false);
Expand Down
1 change: 1 addition & 0 deletions source/blood/src/osdcmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ int32_t registerosdcommands(void)
{ "in_mousedeadzone", "amount of mouse movement to filter out", (void *)&MouseDeadZone, CVAR_INT, 0, 512 },
{ "in_mouseflip", "invert vertical mouse movement", (void *)&gMouseAimingFlipped, CVAR_BOOL, 0, 1 },
{ "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 },
{ "in_turnsensitivity", "keyboard turning sensitivity multiplier", (void *)&gTurnSpeed, CVAR_INT, 64, 124 },
//
{ "mus_enabled", "enables/disables music", (void *)&MusicToggle, CVAR_BOOL, 0, 1 },
{ "mus_restartonload", "restart the music when loading a saved game with the same map or not", (void *)&MusicRestartsOnLoadToggle, CVAR_BOOL, 0, 1 },
Expand Down

0 comments on commit 5e9fa37

Please sign in to comment.