mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
2a6cdc7a6a
34 changed files with 42 additions and 44 deletions
|
@ -866,12 +866,6 @@ static void M_Dim()
|
|||
amount = gameinfo.dimamount;
|
||||
}
|
||||
|
||||
if (gameinfo.gametype == GAME_Hexen && gamestate == GS_DEMOSCREEN)
|
||||
{ // On the Hexen title screen, the default dimming is not
|
||||
// enough to make the menus readable.
|
||||
amount = MIN<float>(1.f, amount*2.f);
|
||||
}
|
||||
|
||||
screen->Dim(dimmer, amount, 0, 0, screen->GetWidth(), screen->GetHeight());
|
||||
}
|
||||
|
||||
|
|
|
@ -53,12 +53,12 @@ EXTERN_CVAR(Bool, cl_run)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, ColorChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(r);
|
||||
PARAM_INT(g);
|
||||
PARAM_INT(b);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
char command[24];
|
||||
players[consoleplayer].userinfo.ColorChanged(MAKERGB(r, g, b));
|
||||
|
@ -78,12 +78,12 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, ColorChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, PlayerNameChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(s);
|
||||
const char *pp = s;
|
||||
FString command("name \"");
|
||||
|
||||
if (self == CurrentMenu || self == CurrentMenu->mParentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
// Escape any backslashes or quotation marks before sending the name to the console.
|
||||
for (auto p = pp; *p != '\0'; ++p)
|
||||
|
@ -108,9 +108,9 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, PlayerNameChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, ColorSetChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(sel);
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
players[consoleplayer].userinfo.ColorSetChanged(sel);
|
||||
char command[24];
|
||||
|
@ -128,10 +128,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, ColorSetChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, ClassChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(sel);
|
||||
PARAM_POINTER(cls, FPlayerClass);
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
players[consoleplayer].userinfo.PlayerClassNumChanged(gameinfo.norandomplayerclass ? sel : sel - 1);
|
||||
cvar_set("playerclass", sel == 0 && !gameinfo.norandomplayerclass ? "Random" : GetPrintableDisplayName(cls->Type).GetChars());
|
||||
|
@ -148,9 +148,9 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, ClassChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, SkinChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(sel);
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
players[consoleplayer].userinfo.SkinNumChanged(sel);
|
||||
cvar_set("skin", Skins[sel].Name);
|
||||
|
@ -166,10 +166,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, SkinChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, AutoaimChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_FLOAT(val);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
autoaim = float(val);
|
||||
}
|
||||
|
@ -184,10 +184,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, AutoaimChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, TeamChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(val);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
team = val == 0 ? TEAM_NONE : val - 1;
|
||||
}
|
||||
|
@ -202,10 +202,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, TeamChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, GenderChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(v);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
switch(v)
|
||||
{
|
||||
|
@ -226,10 +226,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, GenderChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, SwitchOnPickupChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(v);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
neverswitchonpickup = !!v;
|
||||
}
|
||||
|
@ -244,10 +244,10 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, SwitchOnPickupChanged)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(DPlayerMenu, AlwaysRunChanged)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DMenu);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(v);
|
||||
// only allow if the menu is active to prevent abuse.
|
||||
if (self == CurrentMenu)
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
cl_run = !!v;
|
||||
}
|
||||
|
|
|
@ -783,6 +783,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Find, ArrayFind<FDynArray_Obj COMMA
|
|||
|
||||
int ObjArrayPush(FDynArray_Obj *self, DObject *obj)
|
||||
{
|
||||
if (self == nullptr) NullParam("\"self\"");
|
||||
GC::WriteBarrier(obj);
|
||||
return self->Push(obj);
|
||||
}
|
||||
|
@ -811,6 +812,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete<FDynArray_Obj>)
|
|||
|
||||
void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj)
|
||||
{
|
||||
if (self == nullptr) NullParam("\"self\"");
|
||||
GC::WriteBarrier(obj);
|
||||
self->Insert(index, obj);
|
||||
}
|
||||
|
|
|
@ -119,12 +119,12 @@ inline unsigned short BigShort(unsigned short x)
|
|||
return x;
|
||||
}
|
||||
|
||||
inline unsigned int BigLong(unsigned int &x)
|
||||
inline unsigned int BigLong(unsigned int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
inline int BigLong(int &x)
|
||||
inline int BigLong(int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
|
|
@ -1111,7 +1111,7 @@ void DoomSpecificInfo (char *buffer, size_t bufflen)
|
|||
int i;
|
||||
|
||||
buffer += mysnprintf (buffer, buffend - buffer, GAMENAME " version %s (%s)", GetVersionString(), GetGitHash());
|
||||
buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLine());
|
||||
buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLineA());
|
||||
|
||||
for (i = 0; (arg = Wads.GetWadName (i)) != NULL; ++i)
|
||||
{
|
||||
|
|
|
@ -2694,12 +2694,14 @@ OptionMenu "ReverbSave" protected
|
|||
OptionString "LanguageOptions"
|
||||
{
|
||||
"auto", "Auto"
|
||||
"default", "English (US)"
|
||||
"eng", "English (UK)"
|
||||
"enu", "English (US)"
|
||||
"fr", "Français (FR)"
|
||||
"ita", "Italiano (ITA)"
|
||||
"ptb", "Português do Brasil (PTB)"
|
||||
"rus", "Русский (RU)"
|
||||
"de", "Deutsch"
|
||||
"es", "Español (España)"
|
||||
"esm", "Español (Latino)"
|
||||
"fr", "Français"
|
||||
"it", "Italiano"
|
||||
"ru", "Русский"
|
||||
}
|
||||
|
||||
/*=======================================
|
||||
|
|
|
@ -42,16 +42,16 @@ class PlayerMenu : ListMenu
|
|||
Array<int> mPlayerSkins;
|
||||
|
||||
// All write function for the player config are native to prevent abuse.
|
||||
protected native void AutoaimChanged(float val);
|
||||
protected native void TeamChanged(int val);
|
||||
protected native void AlwaysRunChanged(int val);
|
||||
protected native void GenderChanged(int val);
|
||||
protected native void SwitchOnPickupChanged(int val);
|
||||
protected native void ColorChanged(int red, int green, int blue);
|
||||
protected native void ColorSetChanged(int red);
|
||||
protected native void PlayerNameChanged(String name);
|
||||
protected native void SkinChanged (int val);
|
||||
protected native void ClassChanged(int sel, PlayerClass cls);
|
||||
protected static native void AutoaimChanged(float val);
|
||||
protected static native void TeamChanged(int val);
|
||||
protected static native void AlwaysRunChanged(int val);
|
||||
protected static native void GenderChanged(int val);
|
||||
protected static native void SwitchOnPickupChanged(int val);
|
||||
protected static native void ColorChanged(int red, int green, int blue);
|
||||
protected static native void ColorSetChanged(int red);
|
||||
protected static native void PlayerNameChanged(String name);
|
||||
protected static native void SkinChanged (int val);
|
||||
protected static native void ClassChanged(int sel, PlayerClass cls);
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue