Enfusion Script API
|
Enforce script system methods More...
Classes | |
interface | FileHandle |
interface | FileIO |
interface | FilePath |
interface | GameProject |
interface | GameSessionStorage |
GameSessionStorage is used to store data for whole lifetime of game executable run. Here can be stored data which must survive scripts/addons reloading. More... | |
interface | ParseHandle |
interface | PixelRawData |
data for pixel in RGBA8 format -> each channel has 8 bits and four channels are used (mostly RGB channels are important) thus size in bytes for one pixel is 4 More... | |
interface | RandomGenerator |
interface | ScreenshotTextureData |
data for screenshot in RGBA8 texture More... | |
interface | ScriptModule |
Module containing compiled scripts. More... | |
interface | System |
interface | SearchResourcesFilter |
Object used for holding filtering params for ResourceDatabase.SearchResources() method. More... | |
interface | MemoryStatsSnapshot |
interface | ProcessHandle |
Handle to a running process. More... | |
Typedefs | |
typedef func | SearchResourcesCallback |
Callback used for processing results from ResourceDatabase.SearchResources() method. | |
typedef func | FindFilesCallback |
typedef func | ScreenshotRawDataCallback |
screenshot callback API, returned data are in RGBA8 format -> each channel has 8 bits and four channels are used thus size in bytes for one pixel is 4 and the int type can be used for simpler work | |
typedef func | ScreenshotTextureCallback |
screenshot callback API, returned texture in RGBA8 format | |
typedef func | GetTextureRawDataCallback |
texture data callback API, returned texture in RGBA8 format | |
Enumerations | |
enum | EPlatform { EPlatform.WINDOWS , EPlatform.LINUX , EPlatform.XBOX_ONE , EPlatform.XBOX_ONE_S , EPlatform.XBOX_ONE_X , EPlatform.XBOX_SERIES_S , EPlatform.XBOX_SERIES_X , EPlatform.PS4 , EPlatform.PS5 , EPlatform.PS5_PRO , EPlatform.UNKNOWN } |
enum | FileAttribute { FileAttribute.DIRECTORY , FileAttribute.HIDDEN , FileAttribute.READONLY , FileAttribute.COMPRESSED , FileAttribute.ARCHIVE , FileAttribute.SYSTEM , FileAttribute.NOINDEXED , FileAttribute.ENCRYPTED , FileAttribute.ISCREATOR , FileAttribute.INVALID } |
File attributes. See FileDescription. More... | |
enum | FileMode { FileMode.READ , FileMode.OPENW , FileMode.WRITE , FileMode.APPEND , FileMode.MASK , FileMode.FILEFLAGS_NO_PREREAD } |
Mode for opening file. See FileSystem.Open. More... | |
Functions | |
void | SearchResourcesCallback (ResourceName resourceName, string exactPath="") |
void | FindFilesCallback (string fileName, FileAttribute attributes=0, string filesystem=string.Empty) |
void | ScreenshotRawDataCallback (PixelRawData data, int imageWidth, int imageHeight, int stride) |
void | ScreenshotTextureCallback (ScreenshotTextureData data) |
void | GetTextureRawDataCallback (PixelRawData data, int imageWidth, int imageHeight, int stride) |
Enforce script system methods
typedef func FindFilesCallback |
typedef func GetTextureRawDataCallback |
texture data callback API, returned texture in RGBA8 format
typedef func ScreenshotRawDataCallback |
screenshot callback API, returned data are in RGBA8 format -> each channel has 8 bits and four channels are used thus size in bytes for one pixel is 4 and the int type can be used for simpler work
example how to access pixel data on further c++ side:
for (int y = 0; y < height; y++) { int const* row = (int const*) (((char const*) data) + stride); for (int x = 0; x < width; x++) { int pixel = row[x]; ... } }
pixels | pointer to raw pixels |
width | width of image data |
height | height of image data |
stride | stride is offset to next row - it doesn't need to be same like image width due to GPU data alignment rules |
typedef func ScreenshotTextureCallback |
screenshot callback API, returned texture in RGBA8 format
typedef func SearchResourcesCallback |
Callback used for processing results from ResourceDatabase.SearchResources() method.
enum EPlatform |
enum FileAttribute |
File attributes. See FileDescription.
enum FileMode |
void FindFilesCallback | ( | string | fileName, |
FileAttribute | attributes = 0, | ||
string | filesystem = string.Empty ) |
void GetTextureRawDataCallback | ( | PixelRawData | data, |
int | imageWidth, | ||
int | imageHeight, | ||
int | stride ) |
void ScreenshotRawDataCallback | ( | PixelRawData | data, |
int | imageWidth, | ||
int | imageHeight, | ||
int | stride ) |
void ScreenshotTextureCallback | ( | ScreenshotTextureData | data | ) |
void SearchResourcesCallback | ( | ResourceName | resourceName, |
string | exactPath = "" ) |