MCPcopy Create free account
hub / github.com/crownengine/crown / LuaEnvironment

Method LuaEnvironment

src/lua/lua_environment.cpp:241–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239#endif // if CROWN_DEBUG
240
241LuaEnvironment::LuaEnvironment()
242 : L(NULL)
243 , _num_vec3(0)
244 , _num_quat(0)
245 , _num_mat4(0)
246#if CROWN_DEBUG
247 , _vec3_marker(0)
248 , _quat_marker(0)
249 , _mat4_marker(0)
250 , _random(0)
251#endif
252{
253#if CROWN_DEBUG
254 // Initialize temporaries markers with random values.
255 _random._seed = (s32)guid::new_guid().data1;
256 reset_temporaries();
257#endif
258
259 L = luaL_newstate();
260 CE_ASSERT(L, "Unable to create lua state");
261}
262
263LuaEnvironment::~LuaEnvironment()
264{

Callers

nothing calls this directly

Calls 2

new_guidFunction · 0.85
luaL_newstateFunction · 0.50

Tested by

no test coverage detected