-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageManager.h
More file actions
44 lines (31 loc) · 1.31 KB
/
ImageManager.h
File metadata and controls
44 lines (31 loc) · 1.31 KB
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
38
39
40
41
42
43
#pragma once
#include "singletonBase.h"
#include "image.h"
#include <map>
class ImageManager : public singletonBase<ImageManager>
{
private:
//first - string
//second - image*
typedef map<string, image*> mapImageList;
typedef map<string, image*>::iterator mapImageIter;
private:
mapImageList _mImageList;
public:
ImageManager();
~ImageManager();
HRESULT init();
void release();
image* addImage(string strKey, int width, int height);
image* addImage(string strKey, const char* fileName, int width, int height, bool trans, COLORREF transColor);
image* addFrameImage(string strKey, const char* fileName, float x, float y, int width, int height, int frameX, int frameY, bool trans, COLORREF transColor);
image* addFrameImage(string strKey, const char* fileName, int width, int height, int frameX, int frameY, bool trans, COLORREF transColor);
image* findImage(string strKey);
BOOL deleteImage(string strKey);
BOOL deleteAll();
//void render(string strKey, HDC hdc);
void render(string strKey, HDC hdc, int destX, int destY);
void render(string strKey, HDC hdc, int destX, int destY, int sourX, int sourY, int sourWidth, int sourHeight);
void frameRender(string strKey, HDC hdc, int destX, int destY);
void frameRender(string strKey, HDC hdc, int destX, int destY, int currentFrameX, int currentFrameY);
};