pixelperfectengine.scripting.lua

Undocumented in source.

Public Imports

pixelperfectengine.scripting.globals
public import pixelperfectengine.scripting.globals;
Undocumented in source.

Members

Aliases

LuaTable
alias LuaTable = LinkedMap!(LuaVar, LuaVar)
Undocumented in source.

Classes

LuaException
class LuaException

Thrown on errors encountered during Lua script execution.

LuaScript
class LuaScript

Implements an interface to the lua_State* variable with automatic garbage management and some basic functionality.

Enums

LuaVarType
enum LuaVarType

Contains type identifiers related to Lua.

Functions

callLuaFunc
T callLuaFunc(lua_State* state, ...)

Calls a Lua function with the given name and arguments.

initLua
bool initLua()

Initializes the Lua scripting engine.

luaAllocator
void* luaAllocator(void* ud, void* ptr, size_t osize, size_t nsize)

A default allocator for Lua.

luaGetFromIndex
T luaGetFromIndex(lua_State* L, int ind)

Fetches a value from a lua_State variable.

registerDDelegate
int registerDDelegate(lua_State* state)

Registers a D delegate to be called from Lua. Code is modified from MrcSnm's example found in the HipremeEngine.

registerDFunction
int registerDFunction(lua_State* state)

Registers a D function to be called from Lua. Code is modified from MrcSnm's example found in the HipremeEngine.

registerLibForScripting (from pixelperfectengine.scripting.lualib)
void registerLibForScripting(lua_State* state) via public import pixelperfectengine.scripting.lualib : registerLibForScripting;

Registers the PPE standard library for a Lua script, so engine functions can be called through a Lua script.

Static variables

lastLuaToDException
Exception lastLuaToDException;

Contains the pointer to the exception thrown by a D function called from the Lua side.

Structs

LuaVar
struct LuaVar

Implements a Lua variable with all the underlying stuff required for it.

Meta