mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-17 08:21:28 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts: # wadsrc/static/zscript/menu/optionmenuitems.txt
This commit is contained in:
commit
88a5c997de
13 changed files with 38 additions and 17 deletions
|
@ -558,7 +558,7 @@ void C_UnbindAll ()
|
|||
AutomapBindings.UnbindAll();
|
||||
}
|
||||
|
||||
CCMD (unbindall)
|
||||
UNSAFE_CCMD (unbindall)
|
||||
{
|
||||
C_UnbindAll ();
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ UNSAFE_CCMD (error_fatal)
|
|||
//==========================================================================
|
||||
|
||||
#if !defined(_WIN32) || !defined(_DEBUG)
|
||||
CCMD (crashout)
|
||||
UNSAFE_CCMD (crashout)
|
||||
{
|
||||
*(volatile int *)0 = 0;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -2618,7 +2618,7 @@ CCMD (playdemo)
|
|||
}
|
||||
}
|
||||
|
||||
CCMD (timedemo)
|
||||
UNSAFE_CCMD (timedemo)
|
||||
{
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
|
|
|
@ -224,7 +224,7 @@ CCMD (map)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD(recordmap)
|
||||
UNSAFE_CCMD(recordmap)
|
||||
{
|
||||
if (netgame)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
9
wadsrc/static/credits/dbigfont.txt
Normal file
9
wadsrc/static/credits/dbigfont.txt
Normal file
|
@ -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.
|
Binary file not shown.
Binary file not shown.
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
BIN
wadsrc_extra/static/dbigfont.lmp
Normal file
BIN
wadsrc_extra/static/dbigfont.lmp
Normal file
Binary file not shown.
BIN
wadsrc_extra/static/sbigfont.lmp
Normal file
BIN
wadsrc_extra/static/sbigfont.lmp
Normal file
Binary file not shown.
Loading…
Reference in a new issue