MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / LoadAnimation

Method LoadAnimation

LuaSTGPlus/ResourceMgr.cpp:787–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787bool ResourcePool::LoadAnimation(const char* name, const char* texname,
788 double x, double y, double w, double h, int n, int m, int intv, double a, double b, bool rect)
789{
790 LDEBUG_RESOURCETIMER;
791
792 {
793 LDEBUG_RESOURCESCOPE;
794
795 if (m_AnimationPool.find(name) != m_AnimationPool.end())
796 {
797 LWARNING("LoadAnimation: ����'%m'�Ѵ��ڣ����ز����ѱ�ȡ��", name);
798 return true;
799 }
800
801 fcyRefPointer<ResTexture> pTex = m_pMgr->FindTexture(texname);
802 if (!pTex)
803 {
804 LWARNING("LoadAnimation: ���ض���'%m'ʧ��, �޷��ҵ�����'%m'", name, texname);
805 return false;
806 }
807
808 try
809 {
810 fcyRefPointer<ResAnimation> tRes;
811 tRes.DirectSet(new ResAnimation(name, pTex, (float)x, (float)y, (float)w, (float)h, n, m, intv, a, b, rect));
812 m_AnimationPool.emplace(name, tRes);
813 }
814 catch (const fcyException&)
815 {
816 LERROR("LoadAnimation: ���춯��'%m'ʱʧ��", name);
817 return false;
818 }
819 catch (const bad_alloc&)
820 {
821 LERROR("LoadAnimation: �ڴ治��");
822 return false;
823 }
824
825#ifdef LSHOWRESLOADINFO
826 LINFO("LoadAnimation: ����'%m'��װ�� (%s)", name, getResourcePoolTypeName());
827#endif
828 }
829
830 LDEBUG_RESOURCEHINT(ResourceType::Animation, L"N/A");
831 return true;
832}
833
834bool ResourcePool::LoadMusic(const char* name, const std::wstring& path, double start, double end)LNOEXCEPT
835{

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
FindTextureMethod · 0.80

Tested by

no test coverage detected