diff --git a/src/g_level.cpp b/src/g_level.cpp index 0ee56d6c3..c333ba074 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1952,6 +1952,23 @@ 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()); +} + //========================================================================== // // diff --git a/src/g_levellocals.h b/src/g_levellocals.h index 505d797b6..024e6302d 100644 --- a/src/g_levellocals.h +++ b/src/g_levellocals.h @@ -46,6 +46,7 @@ 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 diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index c0373fab0..237f8a084 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -547,6 +547,7 @@ 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;