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

Method SetResourceStatus

LuaSTGPlus/LuaWrapper.cpp:797–809  ·  view source on GitHub ↗

资源控制函数

Source from the content-addressed store, hash-verified

795
796 // 资源控制函数
797 static int SetResourceStatus(lua_State* L)LNOEXCEPT
798 {
799 const char* s = luaL_checkstring(L, 1);
800 if (strcmp(s, "global") == 0)
801 LRES.SetActivedPoolType(ResourcePoolType::Global);
802 else if (strcmp(s, "stage") == 0)
803 LRES.SetActivedPoolType(ResourcePoolType::Stage);
804 else if (strcmp(s, "none") == 0)
805 LRES.SetActivedPoolType(ResourcePoolType::None);
806 else
807 return luaL_error(L, "invalid argument #1 for 'SetResourceStatus', requires 'stage', 'global' or 'none'.");
808 return 0;
809 }
810 static int LoadTexture(lua_State* L)LNOEXCEPT
811 {
812 const char* name = luaL_checkstring(L, 1);

Callers

nothing calls this directly

Calls 1

SetActivedPoolTypeMethod · 0.80

Tested by

no test coverage detected