| 785 | } |
| 786 | |
| 787 | bool 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 | |
| 834 | bool ResourcePool::LoadMusic(const char* name, const std::wstring& path, double start, double end)LNOEXCEPT |
| 835 | { |
nothing calls this directly
no test coverage detected