-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSCRFile.h
More file actions
36 lines (27 loc) · 757 Bytes
/
Copy pathSCRFile.h
File metadata and controls
36 lines (27 loc) · 757 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
#ifndef SCRFILE_H
#define SCRFILE_H
#include "CompressedBaseFile.h"
#include "GraphicBaseFile.h"
namespace SCRANTIC {
class SCRFile : public CompressedBaseFile, public GraphicBaseFile {
protected:
u16 dimBinSize; //
u16 magic; //0x8000
u32 dimSize;
u16 imageCount;
u16 width;
u16 height;
v8 uncompressedData;
SDL_Surface *image;
SDL_Texture *texture;
public:
SCRFile(const std::string &name, v8 &data);
explicit SCRFile(const std::string &bmpFilename);
~SCRFile();
void saveFile(const std::string &path) override;
v8 repackIntoResource() override;
SDL_Texture *getImage(SDL_Renderer *renderer, SDL_Rect &rect);
void setPalette(SDL_Color color[], u16 count);
};
}
#endif // SCRFILE_H