ScummVM API documentation
rpza.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_RPZA_H
23 #define IMAGE_CODECS_RPZA_H
24 
25 #include "graphics/pixelformat.h"
26 #include "image/codecs/codec.h"
27 
28 namespace Image {
29 
35 class RPZADecoder : public Codec {
36 public:
37  RPZADecoder(uint16 width, uint16 height);
38  ~RPZADecoder() override;
39 
41  Graphics::PixelFormat getPixelFormat() const override { return _format; }
42 
43  bool containsPalette() const override { return _ditherPalette != 0; }
44  const byte *getPalette() override { _dirtyPalette = false; return _ditherPalette; }
45  bool hasDirtyPalette() const override { return _dirtyPalette; }
46  bool canDither(DitherType type) const override;
47  void setDither(DitherType type, const byte *palette) override;
48 
49 private:
50  Graphics::PixelFormat _format;
51  Graphics::Surface *_surface;
52  byte *_ditherPalette;
53  bool _dirtyPalette;
54  byte *_colorMap;
55  uint16 _width, _height;
56  uint16 _blockWidth, _blockHeight;
57 };
58 
59 } // End of namespace Image
60 
61 #endif
Definition: surface.h:67
bool containsPalette() const override
Definition: rpza.h:43
Graphics::PixelFormat getPixelFormat() const override
Definition: rpza.h:41
Definition: pixelformat.h:138
const Graphics::Surface * decodeFrame(Common::SeekableReadStream &stream) override
Definition: stream.h:745
Definition: codec.h:57
const byte * getPalette() override
Definition: rpza.h:44
bool hasDirtyPalette() const override
Definition: rpza.h:45
void setDither(DitherType type, const byte *palette) override
Definition: rpza.h:35
bool canDither(DitherType type) const override
DitherType
Definition: codec.h:65
Definition: movie_decoder.h:32