-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimageManager.h
82 lines (69 loc) · 3.96 KB
/
imageManager.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#pragma once
#include "singletonBase.h"
#include "image.h"
//=============================================================
// ## imageManager ##
//=============================================================
class imageManager : public singletonBase <imageManager>
{
private:
typedef map<string, image*> mapImageList; //맵으로 만든 이미지목록
typedef map<string, image*>::iterator mapImageIter; //맵으로 만든 이미지목록의 반복자
private:
//map<string, image*> _mImageList;
mapImageList _mImageList; //실제 이미지클래스를 담을 STL맵
public:
//이미지 매니져 초기화
HRESULT init();
//이미지 매니져 해제
void release();
//빈 비트맵 초기화
image* addImage(string strKey, int width, int height);
//이미지 파일로 초기화
image* addImage(string strKey, const char* fileName, int width, int height, bool isTrans = false, COLORREF transColor = RGB(0, 0, 0));
image* addImage(string strKey, const char* fileName, float x, float y, int width, int height, bool isTrans = false, COLORREF transColor = RGB(0, 0, 0));
//프레임 이미지 파일로 초기화
image* addFrameImage(string strKey, const char* fileName, int width, int height, int frameX, int frameY, bool isTrans = true, COLORREF transColor = RGB(255, 0, 255));
image* addFrameImage(string strKey, const char* fileName, float x, float y, int width, int height, int frameX, int frameY, bool isTrans = true, COLORREF transColor = RGB(255, 0, 255));
//이미지 키값으로 찾기
image* findImage(string strKey);
//이미지 키값으로 삭제
BOOL deleteImage(string strKey);
//이미지 전체삭제
BOOL deleteAll();
//=============================================================
// ## 일반렌더 ##
//=============================================================
void render(string strKey, HDC hdc, int destX, int destY);
void render(string strKey, HDC hdc, int destX, int destY, float zoomRate);
void render(string strKey, HDC hdc, int destX, int destY, int sourX, int sourY, int sourWidth, int sourHeight);
//=============================================================
// ## 알파렌더 ##
//=============================================================
void alphaRender(string strKey, HDC hdc, BYTE alpha);
void alphaRender(string strKey, HDC hdc, int destX, int destY, BYTE alpha);
void alphaRender(string strKey, HDC hdc, int destX, int destY, BYTE alpha, float zoomRate);
void alphaRender(string strKey, HDC hdc, int destX, int destY, int sourX, int sourY, int sourWidth, int sourHeight, BYTE alpha);
//=============================================================
// ## 스트레치렌더 ##
//=============================================================
void stretchRender(string strKey, HDC hdc, int dx, int dy, int sourX, int sourY, int sourWidth, int sourHeight);
// + 알파
void stretchRender(string strKey, HDC hdc, int dx, int dy, int sourX, int sourY, int sourWidth, int sourHeight, BYTE alpha);
void stretchRender(string strKey, HDC hdc, int dx, int dy, int sourX, int sourY, int sourWidth, int sourHeight, BYTE alpha, float zoomRate);
//=============================================================
// ## 프레임렌더 ##
//=============================================================
void frameRender(string strKey, HDC hdc, int destX, int destY);
void frameRender(string strKey, HDC hdc, int destX, int destY, float zoomRate);
void frameRender(string strKey, HDC hdc, int destX, int destY, int currentFrameX, int currentFrameY);
void frameRender(string strKey, HDC hdc, int destX, int destY, int currentFrameX, int currentFrameY, float zoomRate);
void frameRender(string strKey, HDC hdc, int destX, int destY, int p_width, int p_height, int currentFrameX, int currentFrameY, float zoomRate);
//=============================================================
// ## 루프렌더 ##
//=============================================================
void loopRender(string strKey, HDC hdc, const LPRECT drawArea, int offsetX, int offsetY);
void loopAlphaRender(string strKey, HDC hdc, const LPRECT drawArea, int offsetX, int offsetY, BYTE alpha);
imageManager() {}
~imageManager() {}
};