ScummVM API documentation
pcx.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_PCX_H
23 #define IMAGE_PCX_H
24 
25 #include "common/scummsys.h"
26 #include "common/str.h"
27 #include "image/image_decoder.h"
28 
29 namespace Common{
30 class SeekableReadStream;
31 }
32 
33 namespace Image {
34 
50 class PCXDecoder : public ImageDecoder {
51 public:
52  PCXDecoder();
53  virtual ~PCXDecoder();
54 
55  // ImageDecoder API
56  void destroy();
57  virtual bool loadStream(Common::SeekableReadStream &stream);
58  virtual const Graphics::Surface *getSurface() const { return _surface; }
59  const byte *getPalette() const { return _palette; }
60  uint16 getPaletteColorCount() const { return _paletteColorCount; }
61 
62 private:
63  void decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerScanline, bool compressed);
64 
65  Graphics::Surface *_surface;
66  byte *_palette;
67  uint16 _paletteColorCount;
68 };
70 } // End of namespace Image
71 
72 #endif
Definition: image_decoder.h:52
const byte * getPalette() const
Definition: pcx.h:59
Definition: surface.h:66
Definition: pcx.h:50
uint16 getPaletteColorCount() const
Definition: pcx.h:60
Definition: stream.h:745
Definition: algorithm.h:29
virtual const Graphics::Surface * getSurface() const
Definition: pcx.h:58
Definition: movie_decoder.h:32