-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageManager.h
More file actions
40 lines (28 loc) · 871 Bytes
/
ImageManager.h
File metadata and controls
40 lines (28 loc) · 871 Bytes
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
#pragma once
#include"config.h"
#include "Singleton.h"
/*
< 자료구조 >
배열 : 인덱스를 가지고 데이터에 접근한다.
stl::vector : 인덱스를 가지고 데이터에 접근한다.
std::map : 키를 가지고 데이터에 접근한다.
레드-블랙 트리 구현 : 삽입, 삭제, 검색 0(logN) 시간복잡도
*/
class Image;
class ImageManager : public Singleton<ImageManager>
{
private:
std::map<string, Image*> mapImages; // 자료구조 중 map을 사용.
public:
void Init();
void Release();
Image* AddImage(string key, const wchar_t* filePath,
int width, int height,
bool isTransparent = FALSE, COLORREF transColor = FALSE);
Image* AddImage(string key, const wchar_t* filePath,
int width, int height,
int maxFrameX, int maxFrameY,
bool isTransparent = FALSE, COLORREF transColor = FALSE);
void DeleteImage(string key);
Image* FindImage(string key); // 저장된 이미지 찾아오기
};