| 845 | return 0; |
| 846 | } |
| 847 | static int LoadAnimation(lua_State* L)LNOEXCEPT |
| 848 | { |
| 849 | const char* name = luaL_checkstring(L, 1); |
| 850 | const char* texname = luaL_checkstring(L, 2); |
| 851 | |
| 852 | ResourcePool* pActivedPool = LRES.GetActivedPool(); |
| 853 | if (!pActivedPool) |
| 854 | return luaL_error(L, "can't load resource at this time."); |
| 855 | |
| 856 | if (!pActivedPool->LoadAnimation( |
| 857 | name, |
| 858 | texname, |
| 859 | luaL_checknumber(L, 3), |
| 860 | luaL_checknumber(L, 4), |
| 861 | luaL_checknumber(L, 5), |
| 862 | luaL_checknumber(L, 6), |
| 863 | luaL_checkinteger(L, 7), |
| 864 | luaL_checkinteger(L, 8), |
| 865 | luaL_checkinteger(L, 9), |
| 866 | luaL_optnumber(L, 10, 0.0f), |
| 867 | luaL_optnumber(L, 11, 0.0f), |
| 868 | lua_toboolean(L, 12) == 0 ? false : true |
| 869 | )) |
| 870 | { |
| 871 | return luaL_error(L, "load animation failed (name='%s', tex='%s').", name, texname); |
| 872 | } |
| 873 | |
| 874 | return 0; |
| 875 | } |
| 876 | static int LoadPS(lua_State* L)LNOEXCEPT |
| 877 | { |
| 878 | const char* name = luaL_checkstring(L, 1); |
nothing calls this directly
no test coverage detected