Symphony Of Empires
Eng3D::LuaVM Struct Reference

#include <luavm.hpp>

Public Member Functions

 LuaVM ()
 
 ~LuaVM ()
 
int call_func (int nargs, int nret)
 
void invoke_registered_callback (const std::string &name)
 Some UI functions are hardcoded, for example the main menu is hardcoded to appear when the game starts, in order to mantain scriptability we just invoke functions coded in lua. More...
 

Static Public Member Functions

static int call_func (lua_State *L, int nargs, int nret)
 

Public Attributes

lua_State * state = nullptr
 

Detailed Description

Definition at line 42 of file luavm.hpp.

Constructor & Destructor Documentation

◆ LuaVM()

Eng3D::LuaVM::LuaVM ( )

Definition at line 43 of file luavm.cpp.

◆ ~LuaVM()

Eng3D::LuaVM::~LuaVM ( )

Definition at line 386 of file luavm.cpp.

Member Function Documentation

◆ call_func() [1/2]

int Eng3D::LuaVM::call_func ( int  nargs,
int  nret 
)

Definition at line 366 of file luavm.cpp.

◆ call_func() [2/2]

int Eng3D::LuaVM::call_func ( lua_State *  L,
int  nargs,
int  nret 
)
static

Definition at line 344 of file luavm.cpp.

Here is the caller graph for this function:

◆ invoke_registered_callback()

void Eng3D::LuaVM::invoke_registered_callback ( const std::string &  name)

Some UI functions are hardcoded, for example the main menu is hardcoded to appear when the game starts, in order to mantain scriptability we just invoke functions coded in lua.

Parameters
L
name
Returns
int

Definition at line 376 of file luavm.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ state

lua_State* Eng3D::LuaVM::state = nullptr

Definition at line 49 of file luavm.hpp.


The documentation for this struct was generated from the following files: