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

Method reload

src/lua/lua_environment.cpp:606–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604#endif // if CROWN_DEBUG
605
606void LuaEnvironment::reload()
607{
608 LuaStack stack(L);
609
610 lua_getglobal(L, "package");
611 lua_getfield(L, -1, "load_order");
612 for (size_t i = 1, n = lua_objlen(L, -1); i < n + 1; ++i) {
613 lua_rawgeti(L, -1, (int)i);
614 StringId64 name = stack.get_resource_name(-1);
615 this->execute((const LuaResource *)device()->_resource_manager->get(RESOURCE_TYPE_SCRIPT, name), 0);
616 lua_pop(L, 1);
617 }
618 lua_pop(L, 2);
619}
620
621void LuaEnvironment::temp_count(u32 &num_vec3, u32 &num_quat, u32 &num_mat4)
622{

Callers 1

refreshMethod · 0.45

Calls 6

executeMethod · 0.95
deviceFunction · 0.85
lua_getfieldFunction · 0.50
lua_objlenFunction · 0.50
lua_rawgetiFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected