1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#pragma once
#include "common.h"
#include "T2SpriteObj.h"
class AFX_CLASS_EXPORT T2Sprite : private CList<T2SpriteObj *, T2SpriteObj *> {
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;
};
|