|
Enfusion Script API
|
Static Public Member Functions | |
| static proto void | MemoryValidation (bool enable) |
| Switches memory validation (huge slowdown! Use with care only for certain section of code!) | |
| static proto int | MemoryAllocationCount () |
| Number of allocations of physical memory. | |
| static proto int | MemoryAllocationKB () |
| Total allocation of physical memory in kilobytes. | |
| static proto bool | GetCLIParam (string param, out string val) |
| Returns command line argument. | |
| static proto bool | IsCLIParam (string paramName) |
| Returns whether command line parameter is present. | |
| static proto string | ImportFromClipboard () |
| Copy text from clipboard (works only on PC) | |
| static proto void | ExportToClipboard (string text) |
| Set text to clipboard (works only on PC) | |
| static proto string | GetProfileName () |
| static proto string | GetMachineName () |
| static proto int | GetUnixTime () |
| Obtain value of SystemTime as number of seconds since midnight 1970-1-1 UTC. | |
| static proto void | GetHourMinuteSecond (out int hour, out int minute, out int second) |
| Returns current system time (real world time) in local timezone. | |
| static proto void | GetHourMinuteSecondUTC (out int hour, out int minute, out int second) |
| Returns current system time (real world time) in UTC. | |
| static proto void | GetYearMonthDay (out int year, out int month, out int day) |
| Returns current system date (real world date) in local timezone. | |
| static proto void | GetYearMonthDayUTC (out int year, out int month, out int day) |
| Returns current system date (real world date) in UTC. | |
| static proto ProfileData | GetProfileData () |
| static proto int | GetTickCount (int prev=0) |
| Returns number of milliseconds that have elapsed since the game was started. | |
| static proto string | GetAdapterName () |
| static proto void | GetNativeResolution (out int width, out int height) |
| static proto void | GetRenderingResolution (out int width, out int height) |
| static proto void | GetSupportedResolutions (out notnull array< int > widths, out notnull array< int > heights) |
| static proto bool | MakeScreenshot (string path) |
| Takes screenshot and stores it in a BMP format at specified path. | |
| static proto void | MakeScreenshotRawData (ScreenshotRawDataCallback scriptCallback, int posX, int posY, int srcWidth, int srcHeight, int dstWidth, int dstHeight) |
| Take screenshot on specified position and size. | |
| static proto void | MakeScreenshotTexture (ScreenshotTextureCallback scriptCallback, int posX, int posY, int srcWidth, int srcHeight, int dstWidth, int dstHeight) |
| Take screenshot on specified position and size. | |
| static proto float | GetFPS () |
| Returns actual fps (average in last 10 frames) | |
| static proto float | GetFrameTimeS () |
| Returns average time a frame took in seconds (average over last 10 frames) | |
| static proto EPlatform | GetPlatform () |
| Return current platform. | |
| static proto bool | IsConsoleApp () |
| Checks if the app runs in console mode (no rendering, audio or input) | |
| static proto float | GetFinalImageContrast () |
| get final image contrast | |
| static proto float | GetFinalImageBrightness () |
| get final image brightness | |
| static proto float | GetFinalImageGamma () |
| get final image gamma | |
| static proto float | SetFinalImageAttributes (float gamma, float brightness, float contrast) |
| set final image attributes | |
|
static |
Set text to clipboard (works only on PC)
|
static |
Returns command line argument.
| param | Name of a command line argument | |
| [out] | val | Value of the param or empty string if the param was not found |
|
static |
get final image brightness
|
static |
get final image contrast
|
static |
get final image gamma
|
static |
Returns actual fps (average in last 10 frames)
|
static |
Returns average time a frame took in seconds (average over last 10 frames)
|
static |
Returns current system time (real world time) in local timezone.
|
static |
|
static |
Return current platform.
|
static |
|
static |
|
static |
Returns number of milliseconds that have elapsed since the game was started.
|
static |
Obtain value of SystemTime as number of seconds since midnight 1970-1-1 UTC.
|
static |
Copy text from clipboard (works only on PC)
Returns whether command line parameter is present.
| paramName | Name of the command line parameter. |
|
static |
Checks if the app runs in console mode (no rendering, audio or input)
Takes screenshot and stores it in a BMP format at specified path.
| path | Path where screenshot should be written. If you use absolute path or $NamedFileSystem: path, it will be used directly without any changes. If you use relative path, it will be relative to $profile: file system. Finally, if path is empty string, screenshot will be saved to "$profile:ScreenShots/DATETIME.bmp" where DATETIME will be replaced by current date and time. |
|
static |
Take screenshot on specified position and size.
dstWidth x dstHeight point to final image size, if they are zero then they equal to srcWidth x srcHeight. The callback receives raw image data which are valid in the time of callback call only
| scriptCallback | callback to script function which receives the data |
| posX | X position of screenshot |
| posY | Y position of screenshot |
| srcWidth | width of image to be taken |
| srcHeight | height of image to be taken |
| dstWidth | width of destination image, 0 means the srcWidth is used |
| dstHeight | height of destination image, 0 means the srcHeight is used |
|
static |
Take screenshot on specified position and size.
dstWidth x dstHeight point to final image size, if they are zero then they equal to srcWidth x srcHeight. The callback receives a full texture which can be used for any purpose
| scriptCallback | callback to script function which receives the data |
| posX | X position of screenshot |
| posY | Y position of screenshot |
| srcWidth | width of image to be taken |
| srcHeight | height of image to be taken |
| dstWidth | width of destination image, 0 means the srcWidth is used |
| dstHeight | height of destination image, 0 means the srcHeight is used |
|
static |
Number of allocations of physical memory.
|
static |
Total allocation of physical memory in kilobytes.
|
static |
Switches memory validation (huge slowdown! Use with care only for certain section of code!)
|
static |
set final image attributes
| gamma | gamma of image |
| brightness | brightness of image |
| contrast | contrast of image |