diff --git a/game-music-emu/gme/Fir_Resampler.cpp b/game-music-emu/gme/Fir_Resampler.cpp index 355b95914..a311895a2 100644 --- a/game-music-emu/gme/Fir_Resampler.cpp +++ b/game-music-emu/gme/Fir_Resampler.cpp @@ -23,9 +23,9 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #undef PI #define PI 3.1415926535897932384626433832795029 -#if _MSC_VER >= 1911 && defined _M_X64 +#if _MSC_VER >= 1911 #pragma float_control(precise, on, push) -#endif // _MSC_VER >= 1911 && _M_X64 +#endif // _MSC_VER >= 1911 static void gen_sinc( double rolloff, int width, double offset, double spacing, double scale, int count, short* out ) @@ -56,9 +56,9 @@ static void gen_sinc( double rolloff, int width, double offset, double spacing, } } -#if _MSC_VER >= 1911 && defined _M_X64 +#if _MSC_VER >= 1911 #pragma float_control(pop) -#endif // _MSC_VER >= 1911 && _M_X64 +#endif // _MSC_VER >= 1911 Fir_Resampler_::Fir_Resampler_( int width, sample_t* impulses_ ) : width_( width ), diff --git a/src/am_map.cpp b/src/am_map.cpp index 5ab41cd09..540461441 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -104,9 +104,9 @@ CUSTOM_CVAR (Int, am_emptyspacemargin, 0, CVAR_ARCHIVE) { self = 0; } - else if (self > 50) + else if (self > 90) { - self = 50; + self = 90; } AM_NewResolution(); diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index 996872a66..1bca9051b 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -126,7 +126,7 @@ FButtonStatus Button_Mlook, Button_Klook, Button_Use, Button_AltAttack, Button_AM_PanLeft, Button_AM_PanRight, Button_AM_PanDown, Button_AM_PanUp, Button_AM_ZoomIn, Button_AM_ZoomOut; -bool ParsingKeyConf; +bool ParsingKeyConf, ParsingMenuDef = false; // To add new actions, go to the console and type "key ". // This will give you the key value to use in the first column. Then @@ -187,6 +187,21 @@ static const char *KeyConfCommands[] = "clearplayerclasses" }; +static const char *MenuDefCommands[] = +{ + "snd_reset", + "reset2defaults", + "menuconsole", + "clearnodecache", + "am_restorecolors", + "special", + "puke", + "fpuke", + "pukename", + "event", + "netevent" +}; + // CODE -------------------------------------------------------------------- IMPLEMENT_CLASS(DWaitingCommand, false, false) @@ -584,6 +599,25 @@ void C_DoCommand (const char *cmd, int keynum) } } + if (ParsingMenuDef) + { + int i; + + for (i = countof(MenuDefCommands)-1; i >= 0; --i) + { + if (strnicmp (beg, MenuDefCommands[i], len) == 0 && + MenuDefCommands[i][len] == 0) + { + break; + } + } + if (i < 0) + { + Printf ("Invalid command for MENUDEF/ZScript: %s\n", beg); + return; + } + } + // Check if this is an action if (*beg == '+' || *beg == '-') { @@ -670,7 +704,9 @@ DEFINE_ACTION_FUNCTION(DOptionMenuItemCommand, DoCommand) if (CurrentMenu == nullptr) return 0; PARAM_PROLOGUE; PARAM_STRING(cmd); + ParsingMenuDef = true; C_DoCommand(cmd); + ParsingMenuDef = false; return 0; } diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index 3531cf2f6..bf5f4410f 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -139,6 +139,7 @@ void ActivateEndGameMenu() M_ClearMenus(); if (!netgame) { + G_CheckDemoStatus(); D_StartTitle(); } }); diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index bcf40aece..85b4eda0f 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1091,7 +1091,7 @@ OptionMenu AutomapOptions protected Option "$AUTOMAPMNU_TEXTURED", "am_textured", "OnOff" Option "$AUTOMAPMNU_FOLLOW", "am_followplayer", "OnOff" Option "$AUTOMAPMNU_PTOVERLAY", "am_portaloverlay", "OnOff" - Slider "$AUTOMAPMNU_EMPTYSPACEMARGIN", "am_emptyspacemargin", 0, 50, 5, 0 + Slider "$AUTOMAPMNU_EMPTYSPACEMARGIN", "am_emptyspacemargin", 0, 90, 5, 0 StaticText " " Option "$AUTOMAPMNU_SHOWITEMS", "am_showitems", "OnOff" Option "$AUTOMAPMNU_SHOWMONSTERS", "am_showmonsters", "OnOff" diff --git a/wadsrc/static/zscript/menu/optionmenuitems.txt b/wadsrc/static/zscript/menu/optionmenuitems.txt index 2bedb55e0..2a9b91b13 100644 --- a/wadsrc/static/zscript/menu/optionmenuitems.txt +++ b/wadsrc/static/zscript/menu/optionmenuitems.txt @@ -126,12 +126,12 @@ class OptionMenuItemSubmenu : OptionMenuItem class OptionMenuItemCommand : OptionMenuItemSubmenu { - bool mCloseOnSelect; + private String ccmd; // do not allow access to this from the outside. - OptionMenuItemCommand Init(String label, Name command, bool centered = false, bool closeonselect = false) + OptionMenuItemCommand Init(String label, Name command, bool centered = false) { Super.Init(label, command, 0, centered); - mCloseOnSelect = closeonselect; + ccmd = command; return self; } @@ -149,7 +149,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu if (m.GetItem(mAction) != self) return false; } Menu.MenuSound("menu/choose"); - DoCommand(mAction); + DoCommand(ccmd); if (mCloseOnSelect) { let curmenu = Menu.GetCurrentMenu();