ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bitmap.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef MEDIASTATION_BITMAP_H
23 #define MEDIASTATION_BITMAP_H
24 
25 #include "common/rect.h"
26 #include "graphics/managed_surface.h"
27 
28 #include "mediastation/datafile.h"
29 #include "mediastation/assetheader.h"
30 
31 namespace MediaStation {
32 
33 enum BitmapCompressionType {
34  kUncompressedBitmap1 = 0,
35  kRleCompressedBitmap = 1,
36  kUnk1CompressedBitmap = 6,
37  kUncompressedBitmap2 = 7,
38 };
39 
40 class BitmapHeader {
41 public:
42  BitmapHeader(Chunk &chunk);
43  virtual ~BitmapHeader();
44 
45  bool isCompressed();
46 
47  Common::Point *_dimensions = nullptr;
48  BitmapCompressionType _compressionType;
49  uint unk2;
50 };
51 
52 class Bitmap {
53 public:
54  BitmapHeader *_bitmapHeader = nullptr;
55 
56  Bitmap(Chunk &chunk, BitmapHeader *bitmapHeader);
57  virtual ~Bitmap();
58 
59  uint16 width();
60  uint16 height();
61  Graphics::ManagedSurface _surface;
62 
63 private:
64  void decompress(Chunk &chunk);
65 };
66 
67 }
68 
69 #endif
Definition: managed_surface.h:51
Definition: asset.h:33
Definition: datafile.h:39
Definition: bitmap.h:40
Definition: bitmap.h:52
Definition: rect.h:45