Gfx Engine

Simple wrapper for the graphic engine class. Provides functionality for loading and storing graphical assets.
Return to Index
asset ( string full_asset_name ) -> ( am.asset )
asset ( am.asset asset ) -> ( am.gfx_engine )
asset ( string full_asset_name ) -> ( am.asset )
Returns the asset with the given full name. The full asset name is made up of the file to load the asset from and the individual name. For example general:cursor If this asset is not found then the data/assets/general.lua file is loaded then the definition is looked for again.
Parameters:
string full_asset_name : The full asset name to load.
Returns:
am.asset : The found asset or nil.
asset ( am.asset asset ) -> ( am.gfx_engine )
Registers an asset with the graphics engine. The name are always namespaced to the file they were loaded from. For example filename:assetname This filename should be relative to the data/assets/ folder. If no filename is given then the current file being loaded will be used. The files under data/assets/ will be automatically loaded when an asset with their filename is used. Assets can also be registered from outside of those files, however they will need to always provide a filename. Assets can be overridden.
Parameters:
am.asset asset : The asset to store.
Returns:
am.gfx_engine : This