-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBMPFile.h
More file actions
45 lines (35 loc) · 1.03 KB
/
Copy pathBMPFile.h
File metadata and controls
45 lines (35 loc) · 1.03 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
44
45
#ifndef BMPFILE_H
#define BMPFILE_H
#include "CompressedBaseFile.h"
#include "GraphicBaseFile.h"
namespace SCRANTIC {
class BMPFile : public CompressedBaseFile, public GraphicBaseFile {
protected:
u16 infBinSize;
u16 magic; //0x8000
u32 infSize;
u16 imageCount;
v16 widthList;
v16 heightList;
v8 uncompressedData;
std::vector<SDL_Surface *> imageList;
std::vector<SDL_Rect> imageRect;
SDL_Surface *overview;
SDL_Texture *ovTexture;
void createOverview();
public:
BMPFile(const std::string &name, v8 &data);
explicit BMPFile(const std::string &path);
~BMPFile();
void saveFile(const std::string &path) override;
v8 repackIntoResource() override;
SDL_Texture *getImage(SDL_Renderer *renderer, u16 num, SDL_Rect &rect);
SDL_Texture *getOverviewImage(SDL_Renderer *renderer, SDL_Rect &rect);
void setPalette(SDL_Color color[], u16 count);
SDL_Rect getRect(u16 num);
size_t getImageCount() {
return imageList.size();
}
};
}
#endif // BMPFILE_H