资源控制函数
| 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); |
nothing calls this directly
no test coverage detected