Exposed pixel stretch to ZScript as member variable instead of function

https://forum.zdoom.org/viewtopic.php?t=58539
This commit is contained in:
alexey.lysiuk 2017-12-29 09:42:03 +02:00
commit 996bddd602
3 changed files with 5 additions and 19 deletions

View file

@ -1481,6 +1481,8 @@ void G_InitLevelLocals ()
level.outsidefogdensity = info->outsidefogdensity;
level.skyfog = info->skyfog;
level.pixelstretch = info->pixelstretch;
compatflags.Callback();
compatflags2.Callback();
@ -1952,23 +1954,6 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, SetInterMusic)
return 0;
}
//==========================================================================
//
//
//
//==========================================================================
float FLevelLocals::PixelStretch()
{
return level.info->pixelstretch;
}
DEFINE_ACTION_FUNCTION(FLevelLocals, GetPixelStretch)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
ACTION_RETURN_FLOAT(self->PixelStretch());
}
//==========================================================================
//
//
@ -2011,6 +1996,7 @@ DEFINE_FIELD(FLevelLocals, teamdamage)
DEFINE_FIELD(FLevelLocals, fogdensity)
DEFINE_FIELD(FLevelLocals, outsidefogdensity)
DEFINE_FIELD(FLevelLocals, skyfog)
DEFINE_FIELD(FLevelLocals, pixelstretch)
DEFINE_FIELD_BIT(FLevelLocals, flags, noinventorybar, LEVEL_NOINVENTORYBAR)
DEFINE_FIELD_BIT(FLevelLocals, flags, monsterstelefrag, LEVEL_MONSTERSTELEFRAG)
DEFINE_FIELD_BIT(FLevelLocals, flags, actownspecial, LEVEL_ACTOWNSPECIAL)