//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// int CScriptObjectSystem::RemoveTexture(IFunctionHandler *pH) { CHECK_PARAMETERS(1); int nID; pH->GetParam(1,nID); m_pRenderer->RemoveTexture(nID); return pH->EndFunction(); }*/ ////////////////////////////////////////////////////////////////
| 978 | @return the texture id if succeded nil if failed |
| 979 | */ |
| 980 | int CScriptObjectSystem::LoadAnimatedTexture(IFunctionHandler *pH) |
| 981 | { |
| 982 | CHECK_PARAMETERS(2); |
| 983 | const char *sFormat; |
| 984 | int nCount,nTid; |
| 985 | pH->GetParam(1,sFormat); |
| 986 | pH->GetParam(2,nCount); |
| 987 | nTid=m_pRenderer->LoadAnimatedTexture(sFormat,nCount); |
| 988 | if(nTid) |
| 989 | { |
| 990 | USER_DATA ud=m_pScriptSystem->CreateUserData((int)nTid,USER_DATA_TEXTURE); |
| 991 | return pH->EndFunction(ud); |
| 992 | } |
| 993 | return pH->EndFunctionNull(); |
| 994 | } |
| 995 | ///////////////////////////////////////////////////////////////////////////////// |
| 996 | ///////////////////////////////////////////////////////////////////////////////// |
| 997 | /*!load a texture |
no test coverage detected