ScummVM API documentation
smc.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 IMAGE_CODECS_SMC_H
23 #define IMAGE_CODECS_SMC_H
24 
25 #include "image/codecs/codec.h"
26 
27 namespace Image {
28 
29 enum {
30  CPAIR = 2,
31  CQUAD = 4,
32  COCTET = 8,
33  COLORS_PER_TABLE = 256
34 };
35 
41 class SMCDecoder : public Codec {
42 public:
43  SMCDecoder(uint16 width, uint16 height);
44  ~SMCDecoder() override;
45 
48 
49 private:
50  Graphics::Surface *_surface;
51 
52  // SMC color tables
53  byte _colorPairs[COLORS_PER_TABLE * CPAIR];
54  byte _colorQuads[COLORS_PER_TABLE * CQUAD];
55  byte _colorOctets[COLORS_PER_TABLE * COCTET];
56 };
57 
58 } // End of namespace Image
59 
60 #endif
Definition: surface.h:67
const Graphics::Surface * decodeFrame(Common::SeekableReadStream &stream) override
Graphics::PixelFormat getPixelFormat() const override
Definition: smc.h:47
Definition: pixelformat.h:138
Definition: stream.h:745
Definition: codec.h:55
Definition: movie_decoder.h:32
Definition: smc.h:41
static PixelFormat createFormatCLUT8()
Definition: pixelformat.h:182