|
UFO: Alien Invasion
|
#include "../../common/scripts_lua.h"

Go to the source code of this file.
Functions | |
| void | CL_InitLua (void) |
| Initializes the ui-lua interfacing environment. | |
| void | CL_ShutdownLua (void) |
| Shutdown the ui-lua interfacing environment. | |
| lua_State * | CL_GetLuaState (void) |
| Returns the lua state for the client side. | |
| void | CL_RegisterCallback (const char *key, LUA_FUNCTION fnc) |
| Registers a lua callback function with a key. | |
| void | CL_ExecuteCallback (lua_State *L, const char *key) |
| Calls the registered lua onload callback function. | |
| void CL_ExecuteCallback | ( | lua_State * | L, |
| const char * | key ) |
Calls the registered lua onload callback function.
| [in] | L | The lua state for calling lua. |
| [in] | key | script The name of the .ufo file holding the lua script. |
Definition at line 194 of file cl_lua.cpp.
References cl_callback, cl_luastate, Com_Printf(), HASH_Get(), and key.
Referenced by UI_CallHandler_OnLoad().
| lua_State * CL_GetLuaState | ( | void | ) |
Returns the lua state for the client side.
Definition at line 166 of file cl_lua.cpp.
References cl_luastate.
Referenced by UI_ExecuteLuaConFunc(), UI_ExecuteLuaEventScript(), UI_ExecuteLuaEventScript_DragDrop(), UI_ExecuteLuaEventScript_DragDrop_IsDropped(), UI_ExecuteLuaEventScript_DragDrop_XY(), UI_ExecuteLuaEventScript_DxDy(), UI_ExecuteLuaEventScript_Key(), UI_ExecuteLuaEventScript_ParamList(), UI_ExecuteLuaEventScript_ReturnBool(), UI_ExecuteLuaEventScript_XY(), UI_ExecuteLuaMethod(), and UI_ParseAndLoadLuaScript().
Initializes the ui-lua interfacing environment.
Definition at line 130 of file cl_lua.cpp.
References cl_callback, CL_InsertModuleLoader(), cl_luastate, CL_ShutdownLua(), HASH_NewTable(), and luaopen_ufo().
Referenced by CL_Init(), CampaignTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefTest::SetUpTestCase(), ParticleTest::SetUpTestCase(), ScriptTest::SetUpTestCase(), and UILevel2Test::SetUpTestCase().
| void CL_RegisterCallback | ( | const char * | key, |
| LUA_FUNCTION | fnc ) |
Registers a lua callback function with a key.
| key | A key for finding the callback function by name, usually the script name. |
| fnc | A lua function registered in the lua registry index. |
Definition at line 175 of file cl_lua.cpp.
References cl_callback, Com_Printf(), HASH_Insert(), int(), key, and len.
Referenced by UI_RegisterHandler_OnLoad().
Shutdown the ui-lua interfacing environment.
Definition at line 155 of file cl_lua.cpp.
References cl_callback, cl_luastate, and HASH_DeleteTable().
Referenced by CL_InitLua(), CL_Shutdown(), and TEST_Shutdown().