/////////////////////////////////////////////////////////////////////////// ResAnimation ///////////////////////////////////////////////////////////////////////////
| 32 | /// ResAnimation |
| 33 | //////////////////////////////////////////////////////////////////////////////// |
| 34 | ResAnimation::ResAnimation(const char* name, fcyRefPointer<ResTexture> tex, float x, float y, float w, float h, |
| 35 | int n, int m, int intv, double a, double b, bool rect) |
| 36 | : Resource(ResourceType::Animation, name), m_Interval(intv), m_HalfSizeX(a), m_HalfSizeY(b), m_bRectangle(rect) |
| 37 | { |
| 38 | LASSERT(LAPP.GetRenderer()); |
| 39 | |
| 40 | // �ָ����� |
| 41 | for (int j = 0; j < m; ++j) // �� |
| 42 | { |
| 43 | for (int i = 0; i < n; ++i) // �� |
| 44 | { |
| 45 | fcyRefPointer<f2dSprite> t; |
| 46 | if (FCYFAILED(LAPP.GetRenderer()->CreateSprite2D(tex->GetTexture(), fcyRect( |
| 47 | x + w * i, y + h * j, x + w * (i + 1), y + h * (j + 1) |
| 48 | ), &t))) |
| 49 | { |
| 50 | throw fcyException("ResAnimation::ResAnimation", "CreateSprite2D failed."); |
| 51 | } |
| 52 | t->SetZ(0.5f); |
| 53 | t->SetColor(0xFFFFFFFF); |
| 54 | m_ImageSequences.push_back(t); |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | //////////////////////////////////////////////////////////////////////////////// |
| 60 | /// ResParticle |
nothing calls this directly
no test coverage detected