mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
Exposed pixel stretch to ZScript as member variable instead of function
https://forum.zdoom.org/viewtopic.php?t=58539
This commit is contained in:
parent
25d53ecd2c
commit
996bddd602
3 changed files with 5 additions and 19 deletions
|
@ -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)
|
||||
|
|
|
@ -46,7 +46,6 @@ struct FLevelLocals
|
|||
void Tick ();
|
||||
void AddScroller (int secnum);
|
||||
void SetInterMusic(const char *nextmap);
|
||||
float PixelStretch();
|
||||
|
||||
uint8_t md5[16]; // for savegame validation. If the MD5 does not match the savegame won't be loaded.
|
||||
int time; // time in the hub
|
||||
|
@ -149,6 +148,7 @@ struct FLevelLocals
|
|||
int outsidefogdensity;
|
||||
int skyfog;
|
||||
|
||||
float pixelstretch;
|
||||
|
||||
bool IsJumpingAllowed() const;
|
||||
bool IsCrouchingAllowed() const;
|
||||
|
|
|
@ -536,6 +536,7 @@ struct LevelLocals native
|
|||
native readonly int fogdensity;
|
||||
native readonly int outsidefogdensity;
|
||||
native readonly int skyfog;
|
||||
native readonly float pixelstretch;
|
||||
// level_info_t *info cannot be done yet.
|
||||
|
||||
native String GetUDMFString(int type, int index, Name key);
|
||||
|
@ -547,7 +548,6 @@ struct LevelLocals native
|
|||
native static void WorldDone();
|
||||
native static void RemoveAllBots(bool fromlist);
|
||||
native void SetInterMusic(String nextmap);
|
||||
native double GetPixelStretch();
|
||||
native String FormatMapName(int mapnamecolor);
|
||||
native bool IsJumpingAllowed() const;
|
||||
native bool IsCrouchingAllowed() const;
|
||||
|
|
Loading…
Reference in a new issue