mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-17 00:11:05 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
2054f64d3d
6 changed files with 49 additions and 12 deletions
|
@ -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 ),
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 <action name>".
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ void ActivateEndGameMenu()
|
|||
M_ClearMenus();
|
||||
if (!netgame)
|
||||
{
|
||||
G_CheckDemoStatus();
|
||||
D_StartTitle();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue