#ifndef T2DLL_T2SPRITE_H #define T2DLL_T2SPRITE_H #include "../common.h" #include "T2SpriteObj.h" class AFX_CLASS_EXPORT T2Sprite : protected CList { public: T2Sprite(); virtual ~T2Sprite(); enum ELayer { ELayer_0, ELayer_1, ELayer_2, ELayer_3, ELayer_4, ELayer_5, ELayer_6 }; void AllClear(); int NewSprite(T2ImageObj& imageObj, const CString& name, int layer); void DeleteSprite(int index); void ShowSprite(int index, BOOL show); void ChangePattern(int index, int pattern); void MoveSprite(int index, POINT pt); void UpdateSprite(int index); void GetSpriteRect(int index, RECT& outRect); void GetUpdateRect(RECT* outRect, int factor); void DrawLayer(T2BitImage* dest, int layer, int factor); void DrawSprite(T2BitImage* dest, T2SpriteObj* obj, int factor); private: T2SpriteObj* FindObj(int index); void AddUpdateRect(T2SpriteObj* obj, POINT pt); RECT mUpdateRect; friend class T2TowerDoc; }; #endif