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 "graphics/palette.h"
27#include "image/codecs/codec.h"
28
29namespace Image {
30
36class RPZADecoder : public Codec {
37public:
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
50private:
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: stream.h:745
Simple class for handling a palette data.
Definition: palette.h:61
Definition: codec.h:57
DitherType
Definition: codec.h:65
Definition: rpza.h:36
bool canDither(DitherType type) const override
Graphics::PixelFormat getPixelFormat() const override
Definition: rpza.h:42
void setDither(DitherType type, const byte *palette) override
bool hasDirtyPalette() const override
Definition: rpza.h:46
const Graphics::Surface * decodeFrame(Common::SeekableReadStream &stream) override
bool containsPalette() const override
Definition: rpza.h:44
const byte * getPalette() override
Definition: rpza.h:45
Definition: pixelformat.h:138
Definition: surface.h:67