| 874 | return 0; |
| 875 | } |
| 876 | static int LoadPS(lua_State* L)LNOEXCEPT |
| 877 | { |
| 878 | const char* name = luaL_checkstring(L, 1); |
| 879 | const char* path = luaL_checkstring(L, 2); |
| 880 | const char* img_name = luaL_checkstring(L, 3); |
| 881 | |
| 882 | ResourcePool* pActivedPool = LRES.GetActivedPool(); |
| 883 | if (!pActivedPool) |
| 884 | return luaL_error(L, "can't load resource at this time."); |
| 885 | |
| 886 | if (!pActivedPool->LoadParticle( |
| 887 | name, |
| 888 | path, |
| 889 | img_name, |
| 890 | luaL_optnumber(L, 4, 0.0f), |
| 891 | luaL_optnumber(L, 5, 0.0f), |
| 892 | lua_toboolean(L, 6) == 0 ? false : true |
| 893 | )) |
| 894 | { |
| 895 | return luaL_error(L, "load particle failed (name='%s', file='%s', img='%s').", name, path, img_name); |
| 896 | } |
| 897 | |
| 898 | return 0; |
| 899 | } |
| 900 | static int LoadSound(lua_State* L)LNOEXCEPT |
| 901 | { |
| 902 | const char* name = luaL_checkstring(L, 1); |
nothing calls this directly
no test coverage detected