MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / LoadTexture

Method LoadTexture

LuaSTGPlus/LuaWrapper.cpp:810–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808 return 0;
809 }
810 static int LoadTexture(lua_State* L)LNOEXCEPT
811 {
812 const char* name = luaL_checkstring(L, 1);
813 const char* path = luaL_checkstring(L, 2);
814
815 ResourcePool* pActivedPool = LRES.GetActivedPool();
816 if (!pActivedPool)
817 return luaL_error(L, "can't load resource at this time.");
818 if (!pActivedPool->LoadTexture(name, path, lua_toboolean(L, 3) == 0 ? false : true))
819 return luaL_error(L, "can't load texture from file '%s'.", path);
820 return 0;
821 }
822 static int LoadImage(lua_State* L)LNOEXCEPT
823 {
824 const char* name = luaL_checkstring(L, 1);

Callers

nothing calls this directly

Calls 1

GetActivedPoolMethod · 0.80

Tested by

no test coverage detected