diff --git a/src/c_bind.cpp b/src/c_bind.cpp index 5098b9a95..62d497f80 100644 --- a/src/c_bind.cpp +++ b/src/c_bind.cpp @@ -558,7 +558,7 @@ void C_UnbindAll () AutomapBindings.UnbindAll(); } -CCMD (unbindall) +UNSAFE_CCMD (unbindall) { C_UnbindAll (); } diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index e3e87595d..efc11a3d2 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -674,7 +674,7 @@ UNSAFE_CCMD (error_fatal) //========================================================================== #if !defined(_WIN32) || !defined(_DEBUG) -CCMD (crashout) +UNSAFE_CCMD (crashout) { *(volatile int *)0 = 0; } diff --git a/src/c_cvars.cpp b/src/c_cvars.cpp index 6b0b62da7..d51dacdcb 100644 --- a/src/c_cvars.cpp +++ b/src/c_cvars.cpp @@ -1639,9 +1639,7 @@ FBaseCVar *C_CreateCVar(const char *var_name, ECVarType var_type, uint32_t flags void UnlatchCVars (void) { - FLatchedValue var; - - while (LatchedValues.Pop (var)) + for (const FLatchedValue& var : LatchedValues) { uint32_t oldflags = var.Variable->Flags; var.Variable->Flags &= ~(CVAR_LATCH | CVAR_SERVERINFO); @@ -1650,6 +1648,8 @@ void UnlatchCVars (void) delete[] var.Value.String; var.Variable->Flags = oldflags; } + + LatchedValues.Clear(); } void DestroyCVarsFlagged (uint32_t flags) diff --git a/src/g_game.cpp b/src/g_game.cpp index 82bff3f73..0e44e8301 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -2618,7 +2618,7 @@ CCMD (playdemo) } } -CCMD (timedemo) +UNSAFE_CCMD (timedemo) { if (argv.argc() > 1) { diff --git a/src/g_level.cpp b/src/g_level.cpp index b427599f0..0b211f3e6 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -224,7 +224,7 @@ CCMD (map) // //========================================================================== -CCMD(recordmap) +UNSAFE_CCMD(recordmap) { if (netgame) { diff --git a/src/s_environment.cpp b/src/s_environment.cpp index 4d83dd2d4..ac268bc5f 100644 --- a/src/s_environment.cpp +++ b/src/s_environment.cpp @@ -903,9 +903,9 @@ DEFINE_ACTION_FUNCTION(DReverbEdit, GetValue) { PARAM_PROLOGUE; PARAM_INT(index); - float v; + float v = 0; - if (index >= 0 && index < countof(ReverbFields)) + if (index >= 0 && index < (int)countof(ReverbFields)) { auto rev = &ReverbFields[index]; if (rev->Int != nullptr) @@ -931,7 +931,7 @@ DEFINE_ACTION_FUNCTION(DReverbEdit, SetValue) PARAM_INT(index); PARAM_FLOAT(v); - if (index >= 0 && index < countof(ReverbFields)) + if (index >= 0 && index < (int)countof(ReverbFields)) { auto rev = &ReverbFields[index]; if (rev->Int != nullptr) diff --git a/src/sound/i_music.cpp b/src/sound/i_music.cpp index 28f839c6c..342fc5bf6 100644 --- a/src/sound/i_music.cpp +++ b/src/sound/i_music.cpp @@ -708,7 +708,7 @@ ADD_STAT(music) // //========================================================================== -CCMD (writeopl) +UNSAFE_CCMD (writeopl) { if (argv.argc() == 2) { @@ -746,7 +746,7 @@ CCMD (writeopl) // //========================================================================== -CCMD (writewave) +UNSAFE_CCMD (writewave) { if (argv.argc() >= 2 && argv.argc() <= 3) { @@ -784,7 +784,7 @@ CCMD (writewave) // //========================================================================== -CCMD (writemidi) +UNSAFE_CCMD (writemidi) { if (argv.argc() != 2) { diff --git a/wadsrc/static/credits/dbigfont.txt b/wadsrc/static/credits/dbigfont.txt new file mode 100644 index 000000000..9ff451fc2 --- /dev/null +++ b/wadsrc/static/credits/dbigfont.txt @@ -0,0 +1,9 @@ +DBIGFONT, SBIGFONT + +Taken from sp_usimp.zip (Ultimate Simplicity) by Agent Spork + +sp_usimp.txt contains the following permissions: + +Authors MAY use the contents of this file as a base for modification or +reuse. Permissions have been obtained from original authors for any of +their resources modified or included in this file. diff --git a/wadsrc/static/dbigfont.lmp b/wadsrc/static/dbigfont.lmp index b44080a5a..6502551e3 100644 Binary files a/wadsrc/static/dbigfont.lmp and b/wadsrc/static/dbigfont.lmp differ diff --git a/wadsrc/static/sbigfont.lmp b/wadsrc/static/sbigfont.lmp index 9c2a9d367..6502551e3 100644 Binary files a/wadsrc/static/sbigfont.lmp and b/wadsrc/static/sbigfont.lmp differ diff --git a/wadsrc/static/zscript/menu/optionmenuitems.txt b/wadsrc/static/zscript/menu/optionmenuitems.txt index 3405ae549..4668ea068 100644 --- a/wadsrc/static/zscript/menu/optionmenuitems.txt +++ b/wadsrc/static/zscript/menu/optionmenuitems.txt @@ -127,11 +127,13 @@ class OptionMenuItemSubmenu : OptionMenuItem class OptionMenuItemCommand : OptionMenuItemSubmenu { private String ccmd; // do not allow access to this from the outside. + bool mCloseOnSelect; - OptionMenuItemCommand Init(String label, Name command, bool centered = false) + OptionMenuItemCommand Init(String label, Name command, bool centered = false, bool closeonselect = false) { Super.Init(label, command, 0, centered); ccmd = command; + mCloseOnSelect = closeonselect; return self; } @@ -150,6 +152,11 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu } Menu.MenuSound("menu/choose"); DoCommand(ccmd); + if (mCloseOnSelect) + { + let curmenu = Menu.GetCurrentMenu(); + if (curmenu != null) curmenu.Close(); + } return true; } @@ -245,11 +252,11 @@ class OptionMenuItemOptionBase : OptionMenuItem virtual void SetSelection(int Selection) { } - + //============================================================================= override int Draw(OptionMenuDescriptor desc, int y, int indent, bool selected) { - bool grayed = mGrayCheck != null && !(mGrayCheck.GetInt()); + bool grayed = isGrayed(); if (mCenter) { @@ -294,10 +301,15 @@ class OptionMenuItemOptionBase : OptionMenuItem } return true; } + + virtual bool isGrayed() + { + return mGrayCheck != null && !mGrayCheck.GetInt(); + } override bool Selectable() { - return mGrayCheck == null || mGrayCheck.GetInt(); + return !isGrayed(); } } diff --git a/wadsrc_extra/static/dbigfont.lmp b/wadsrc_extra/static/dbigfont.lmp new file mode 100644 index 000000000..b44080a5a Binary files /dev/null and b/wadsrc_extra/static/dbigfont.lmp differ diff --git a/wadsrc_extra/static/sbigfont.lmp b/wadsrc_extra/static/sbigfont.lmp new file mode 100644 index 000000000..9c2a9d367 Binary files /dev/null and b/wadsrc_extra/static/sbigfont.lmp differ