| 820 | return 0; |
| 821 | } |
| 822 | static int LoadImage(lua_State* L)LNOEXCEPT |
| 823 | { |
| 824 | const char* name = luaL_checkstring(L, 1); |
| 825 | const char* texname = luaL_checkstring(L, 2); |
| 826 | |
| 827 | ResourcePool* pActivedPool = LRES.GetActivedPool(); |
| 828 | if (!pActivedPool) |
| 829 | return luaL_error(L, "can't load resource at this time."); |
| 830 | |
| 831 | if (!pActivedPool->LoadImage( |
| 832 | name, |
| 833 | texname, |
| 834 | luaL_checknumber(L, 3), |
| 835 | luaL_checknumber(L, 4), |
| 836 | luaL_checknumber(L, 5), |
| 837 | luaL_checknumber(L, 6), |
| 838 | luaL_optnumber(L, 7, 0.), |
| 839 | luaL_optnumber(L, 8, 0.), |
| 840 | lua_toboolean(L, 9) == 0 ? false : true |
| 841 | )) |
| 842 | { |
| 843 | return luaL_error(L, "load image failed (name='%s', tex='%s').", name, texname); |
| 844 | } |
| 845 | return 0; |
| 846 | } |
| 847 | static int LoadAnimation(lua_State* L)LNOEXCEPT |
| 848 | { |
| 849 | const char* name = luaL_checkstring(L, 1); |
nothing calls this directly
no test coverage detected