ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 "graphics/palette.h"
27 #include "image/codecs/codec.h"
28 
29 namespace Image {
30 
36 class RPZADecoder : public Codec {
37 public:
38  RPZADecoder(uint16 width, uint16 height);
39  ~RPZADecoder() override;
40 
42  Graphics::PixelFormat getPixelFormat() const override { return _format; }
43 
44  bool containsPalette() const override { return _ditherPalette != 0; }
45  const byte *getPalette() override { _dirtyPalette = false; return _ditherPalette.data(); }
46  bool hasDirtyPalette() const override { return _dirtyPalette; }
47  bool canDither(DitherType type) const override;
48  void setDither(DitherType type, const byte *palette) override;
49 
50 private:
51  Graphics::PixelFormat _format;
52  Graphics::Surface *_surface;
53  Graphics::Palette _ditherPalette;
54  bool _dirtyPalette;
55  byte *_colorMap;
56  uint16 _width, _height;
57  uint16 _blockWidth, _blockHeight;
58 };
59 
60 } // End of namespace Image
61 
62 #endif
Definition: surface.h:67
bool containsPalette() const override
Definition: rpza.h:44
Graphics::PixelFormat getPixelFormat() const override
Definition: rpza.h:42
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:45
bool hasDirtyPalette() const override
Definition: rpza.h:46
void setDither(DitherType type, const byte *palette) override
Definition: rpza.h:36
bool canDither(DitherType type) const override
Simple class for handling a palette data.
Definition: palette.h:51
DitherType
Definition: codec.h:65
Definition: movie_decoder.h:32