diff --git a/base/wads/newopt.wad b/base/wads/newopt.wad index 8f157f82..886e8752 100644 Binary files a/base/wads/newopt.wad and b/base/wads/newopt.wad differ diff --git a/doomclassic/doom/constructs.h b/doomclassic/doom/constructs.h index 0bebab1b..74047b0c 100644 --- a/doomclassic/doom/constructs.h +++ b/doomclassic/doom/constructs.h @@ -483,14 +483,16 @@ menu_t temp_GameDef = { 0 }; memcpy(&::g->GameDef, &temp_GameDef, sizeof(temp_GameDef)); -menuitem_t temp_CtlMenu[7] = { +menuitem_t temp_CtlMenu[9] = { {1,"M_KEY", M_Key,'k'}, {-1, "", 0}, {1, "M_RMBL", M_Rumble, 'r' }, {1, "M_LAY", M_Layout, 'l'}, {-1, "", 0}, {2,"M_MSENS", M_ChangeSensitivity,'m'}, - {-1,"",0} + {-1,"",0}, + {-1,"",0}, + {1, "M_TRUN", M_ToggleRun, 't'} }; memcpy(::g->CtlMenu, temp_CtlMenu, sizeof(temp_CtlMenu)); menu_t temp_CtlDef = { diff --git a/doomclassic/doom/globaldata.cpp b/doomclassic/doom/globaldata.cpp index 8c273474..c0030ec0 100644 --- a/doomclassic/doom/globaldata.cpp +++ b/doomclassic/doom/globaldata.cpp @@ -89,6 +89,7 @@ void M_Key(int choice); void M_ChangeKeys(int choice); void M_Rumble(int choice); void M_Layout(int choice); +void M_ToggleRun(int choice); void M_FinishReadThis(int choice); void M_LoadSelect(int choice); diff --git a/doomclassic/doom/m_menu.cpp b/doomclassic/doom/m_menu.cpp index 6f81b2df..bc223e13 100644 --- a/doomclassic/doom/m_menu.cpp +++ b/doomclassic/doom/m_menu.cpp @@ -108,6 +108,7 @@ extern idCVar s_useXAudio2; #endif extern idCVar in_photomode; +extern idCVar in_toggleRun; // // defaulted values // @@ -231,6 +232,7 @@ void M_Key(int choice); void M_ChangeKeys(int choice); void M_Rumble(int choice); void M_Layout(int choice); +void M_ToggleRun(int choice); void M_FinishReadThis(int choice); void M_LoadSelect(int choice); @@ -1790,12 +1792,15 @@ void M_DrawCtl(void) const int roundedMouseSpeed = M_GetMouseSpeedForMenu(in_mouseSpeed.GetFloat()); bool rumbleOnOff = in_joystickRumble.GetBool(); bool layoutOnOff = in_joylayout.GetBool(); + bool autorunOnOff = in_toggleRun.GetBool(); V_DrawPatchDirect(::g->CtlDef.x + 95, ::g->CtlDef.y + LINEHEIGHT * rumble, 0, /*(patch_t*)*/img2lmp(W_CacheLumpName(msgNames[rumbleOnOff], PU_CACHE_SHARED), W_GetNumForName(msgNames[rumbleOnOff])), false); V_DrawPatchDirect(::g->CtlDef.x + 99, ::g->CtlDef.y + LINEHEIGHT * layout, 0, /*(patch_t*)*/img2lmp(W_CacheLumpName(layNames[layoutOnOff], PU_CACHE_SHARED), W_GetNumForName(layNames[layoutOnOff])), false); M_DrawThermo(::g->CtlDef.x, ::g->CtlDef.y + LINEHEIGHT * ctl_empty3, 16, roundedMouseSpeed); + V_DrawPatchDirect(::g->CtlDef.x + 148, ::g->CtlDef.y + LINEHEIGHT * togglerun, 0, + /*(patch_t*)*/img2lmp(W_CacheLumpName(msgNames[autorunOnOff], PU_CACHE_SHARED), W_GetNumForName(msgNames[autorunOnOff])), false); //M_DrawThermo(::g->OptionsDef.x,::g->OptionsDef.y+LINEHEIGHT*(scrnsize+1), // 9,::g->screenSize); @@ -2150,6 +2155,11 @@ void M_Layout(int choice) } } +void M_ToggleRun(int choice) +{ + in_toggleRun.SetBool(!in_toggleRun.GetBool()); +} + void M_ChangeDetail(int choice) { diff --git a/doomclassic/doom/structs.h b/doomclassic/doom/structs.h index eb61e312..20eca932 100644 --- a/doomclassic/doom/structs.h +++ b/doomclassic/doom/structs.h @@ -279,6 +279,8 @@ typedef enum ctl_empty2, mousesens, ctl_empty3, + ctl_empty4, + togglerun, ctl_end } ctl_e; // m_menu.structs end // diff --git a/doomclassic/doom/vars.h b/doomclassic/doom/vars.h index 221a65c2..d809343a 100644 --- a/doomclassic/doom/vars.h +++ b/doomclassic/doom/vars.h @@ -436,7 +436,7 @@ menuitem_t GameMenu[7]; menu_t GameDef; menuitem_t ResMenu[20]; menu_t ResDef; -menuitem_t CtlMenu[7]; +menuitem_t CtlMenu[9]; menu_t CtlDef; menuitem_t KeyMenu[30]; menu_t KeyDef;