00001 #ifndef TEXTUREFRAMEANIMATION_H 00002 #define TEXTUREFRAMEANIMATION_H 00003 00004 #pragma once 00005 00006 #include "TextureManager.h" 00007 #include "FrameAnimation.h" 00009 00013 class CTextureFrameAnimation : public CFrameAnimation<tRect> 00014 { 00015 public: 00016 CTextureFrameAnimation(); 00017 virtual ~CTextureFrameAnimation(); 00018 00019 public: 00020 int Create(UINT FrameCount, UINT DataCount); 00021 00027 virtual int Animate(double fTimePerFrame); 00033 virtual int Pause(double fPauseTime = INFINITE); 00039 virtual int Resume(double fTimeToWait = 0); 00044 virtual int Stop(); 00049 virtual void Destroy(); 00055 virtual int LoadXML(TiXmlNode *pDataNode, CString strFilename); 00061 virtual int SaveXML(TiXmlNode *pDataNode, CString strFilename); 00068 void SetTexture(UINT uiFrame, UINT uiTexIndex, CTexture *pTexture = NULL); 00074 void SetFrameRect(UINT uiFrameIndex, tRect& Rect); 00079 CTexture *GetTexture(); 00084 virtual bool IsOfType(eEntityType eType); 00085 00086 protected: 00087 CTexture **m_pTextures; 00094 int SaveFrame(TiXmlNode *pDataNode, UINT uiIndex); 00095 }; 00096 00097 #endif